loadLocaleFromFile

Typecommand
Dictionarylibrary.i18n
Libraryi18n library
Syntax
loadLocaleFromFile  <pURL>, [<pAutoStartup>]
Associationscom.livecode.library.i18n
Summary

Load one or more i18n packages from a file.

Parameters
NameTypeDescription
pURL
  • Path to a plain text file containing a JSON string with a valid format for i18n packages.
  • Path to a folder which will be scanned looking for all plain text files that have a JSON string with a valid format for i18n packages.
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
   loadLocaleFromFile "/i18n/en.json", "en"
end openStack
on openStack
   loadLocaleFromFile "/i18n/", "en"
end openStack
Description

Use the loadLocaleFromFile command to load a language pack into the i18n library language pack store from a file.

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.

Tagsinternationalization,i18n,translation,languages,locale