loadLocale |
Type | command |
Dictionary | library.i18n |
Library | i18n library |
Syntax | loadLocale <pLangPackArray>, [<pAutoStartup>]
|
Associations | com.livecode.library.i18n |
Summary | Load one or more i18n packages.
|
Parameters | Name | Type | Description |
---|
pLangPackArray | | An array with a correct structure for the language packs.
|
pAutoStartup | | This parameter is optional and indicates which language pack is loaded when the load is complete.
- A boolean true or false to indicate that the package being loaded is the one configured as the current package. Default is false
- A string which is the ID of a loaded language pack or can also be one that is being loaded.
- If this parameter is not specified and there is no language pack configured as current. The first one that is sent to load is converted into the current language.
|
|
Example | on openStack
local tLocaleJSON, tLocaleArray
put URL"file:/i18n/en.json" into tLocaleJSON
put JsonToArray(tLocaleJSON) into tLocaleArray
loadLocale tLocaleArray, "en"
end openStack
on openStack
local tLocaleArray
put the cLocales of this stack into tLocaleArray
loadLocale tLocaleArray
end openStack
|
Description | Use the loadLocale command to load a language pack to the i18n library language pack store.
Warning:
If your application is very complex and the language packs you use to internationalize your application are very large.
It is better that you only keep the package you are using in the i18n storage. The rest keep it stored in the form of files. This is for extremely large language packs.
|
Tags | internationalization,i18n,translation,languages,locale |