Localization and Translations API

Sitefinity CMS enables you, as content creator, to localize your site in as many language versions as required. By using Sitefinity’s multilingual support you can localize pages, content items, taxonomies, and so forth. Thus, you can address your site’s international audience and target a greater number of users.

Creating and working with multilingual items programmatically is very similar to the standard monolingual operations: create, query, modify, and delete. The major difference in managing localized content is that you need to specify the desired culture and pass it as a parameter to the appropriate methods.

This articles examines several common scenarios for working with multilingual items in a non-default culture and demonstrates the use of Sitefinity’s API through code examples.

Prerequisites

To view localized pages and content items from Sitefinity's backend, make sure you set the languages in which pages and items need to be localized in. For more information, see Administration: Language settings.

This section contains

Localize pages
To localize pages, you set the required culture by passing it as a parameter to the Lstring properties of the page. You can also add translations to pages and choose localization strategy.
Create a localized page
To create a localized page, you set the required culture by passing it as a parameter to the Lstring properties of the page.
Add a translation to a localized page
Add a translation to a localized page; choose synced or split localization strategy
Localize content items
To localize content items, you set the required culture by passing it as a parameter to the Lstring properties of the item.
Localize dynamic content items
To localize dynamic content items, you set the required culture by passing it as a parameter to the Lstring properties of the item.
Query localized items
You can query items that have a localized field in multiple cultures. You can query all items from a specific culture, for example all items translated in French.
Create custom resource classes
Create a new resource class and register it in Sitefinity. Resource classes distribute labels among multiple projects or to enable translations of labels and text inside widgets or modules.
Mark for translation
Mark items for translation using the API.
Send for translation
Send items for translation using the API.
Upgrade custom multilingual code
How to upgrade your code for multilingual support introduced in Sitefinity 13.1
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
New to Sitefinity?