Cireson Platform Localization
Abstract
Localization of strings within the Cireson Platform is supported through the use of several OData APIs, as well as server side .Net Apis.
Localization is based on the LCID culture Code.
Depending upon the application installed on the platform, one or more languages may be specified, and localized values may be created. If additional languages, or modifications to existing languages are required, you can use the CPEXLets powershell module to manage them.
Getting Localization values
To retrieve a list of the localization values for a given language, you can point your web browser to http://{{PlatformHost}}/api/Localization you will see a list of Localization objects You can filter the list using standard OData.
Note
Localizations are matched by culture/key with the culture allowing fallback to country code, and invariant country.
This means that for a given local: en-US it will attempt to resolve en-US for each key, then en, and finally empty culture.
Setting Localization Values
Once you have identified the culture/key that you would like to modify or add, you can do so by calling the Set-CPEXLocalization
command from the CPEXLets module like so:
Set-CPEXLocalization -culture "es-MX" -key "Hello" -value "Hola" -description "Normal greeting"
The response should look something like:
@odata.context : http://localhost/api/$metadata#Localization/$entity
Key : Hello
Value : Hola
Culture : es-MX
Description : Normal greeting
Id : 1365
ModifiedDate : 2017-11-28T22:48:28.549413Z
ModifiedById : 1
CreatedDate : 2017-11-28T22:48:28.549413Z
CreatedById : 1
Guid : 386cd07d-0369-4f63-af11-f1bdfc3b62c5
IsDeleted : False
Considerations for WebUI based applications
Most applications that Cireson produces will be use WebUI for the UI foundation. Additionally most applications will use American English as the default language. If when viewing a page within a WebUI application, you see text surrounded bu square braces ex: [Hello] this typically means that there is no fallback localization specified for the Current Culture with the key "Hello".