To localize content items, you set the required culture by passing it as a parameter to the Lstring properties of the item.
The following code example demonstrates how to localize a News item.
NOTE: The ID argument is assigned to the master version of the News item. For more information about the different version of a content item, see For developers: Content lifecycle.
In the example below, you perform the following:
Check whether a News item with the same ID already exists. If a News item with the same ID does not exist, create the item by calling the CreateNewsItem method of the NewsManager class. You can create a News item with either predefined or auto-generated ID, depending on which overload of the method you use. The ID argument is assigned to the ID property of the master version of the item.
Set the properties of the News item object.
Passing the culture when setting the Title ensures that the News item is localized for that specific culture.
Recompile and validate the URLs of the News item.
Set the ApprovalWorkflowState to Published by passing the culture for the required localized version.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity