...
The static list of Entity Field Values (EntityFieldValues is a sub-type of EntityFields). The Value and Description fields support localization based on the optional fields Value Culture String ID and Description Culture String ID. the properties ValueLocalized and DescriptionLocalized have been added to the FieldValue (fieldValue) object in Aptify Web. The Combo Box Form Component has been updated to use the localized Value.
ValueLocalized is set based on the following rule:
...
Retrieve a Localized String By Culture String Name
Aptify.framework.utility.cache.getCultureLocalString is the method that is used to return the localized string based on the Culture String Name and Base String. This method accepts an object. The Name of the Culture String is populated in the stringName property and the Base String is populated in the baseString property. The Culture is defined by the currently logged in User's CultureId. If Culture ID is passed into the method, it will be ignored. If the User doesn't have a defined Culture, the system's Built-in Culture is used.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
//Find the Culture String with the Name 'Global.Favorites' and return the localized string.
//'Favorites' is the baseString that will be used if no match is found or if there is no Local String for the User's Culture.
var localizedFavorites = Aptify.framework.utility.cache.getCultureLocalString({
stringName: 'Global.Favorites',
baseString: 'Favorites'
}); |
Retrieve a Localized String By Base String
Aptify.framework.utility.cache.getCultureLocalString is the method that is used to return the localized string based on the Base String. This method accepts an object. Only the baseString property should be provided for a lookup on Base String. If stringName is provided, it will be used for the match. Using stringName for the match is the preferred approach.
Code Block | ||||
---|---|---|---|---|
| ||||
//Find the Culture String using the Base String. Base String is not guaranteed to be unique so the first match will be used.
//Use the Base String 'Favorites'. Note that stringName is not provided. If stringName is provided, it will be used for the Culture
//String match. Using stringName to match on Culture String Name is preferred. The Base String match is used by some core Form Components
//and has been kept for backwards compatibility.
//'Favorites' is the baseString that will be used if no match is found or if there is no Local String for the User's Culture.
var localizedFavorites = Aptify.framework.utility.cache.getCultureLocalString({
baseString: 'Favorites'
});
|
Localization Metadata
The metadata for localization is found under the Localization Application in the Cultures and Culture Strings Entities. There is also a link to a Cultures record in the Users Entity.
...
The benefit of having a Built-in Culture is that it significantly reduces overhead related to localization. When a User's Culture is the Built-in Culture, the Base String can be returned immediately. There is no need to download the Local Strings and there is no need to perform the local string lookup. Most Aptify Users belong to the Built-in culture so it makes sense to optimize for the Built-in Culture,
The Built-in Culture ID value is stored at Aptify.framework.configuration.builtInCultureId. This property is defined at an internal Framework Configuration attribute. This is stored in the minified javascript. In the non-minified source code it is stored in Aptify.Framework.Configuration.Internal.js.