updateLocale

Typecommand
Dictionarylibrary.i18n
Libraryi18n library
Syntax
updateLocale <pLongId>, [<pLocaleID>]
Associationscom.livecode.library.i18n
Summary

Updates object properties based on the current language pack or any other previously loaded.

Parameters
NameTypeDescription
pLongId

The long id of the object to which the i18n update is to be applied. If this object has child controls, they also have their i18n updated.

pLocaleID

The ID of the i18n bundle to apply. If this parameter is not specified, the ID of the current i18n package is taken.

Example
on mouseUp
   # I remove from the storage of the i18n the package for the Spanish language.
   unloadLocale "es"

   # Uploading the English language package to the i18n store.
   loadLocaleFromFile "/assets/i18n/en.leng"

   # Set current language to English.
   setActiveLocale "en"

   # Updating all UI texts.
   updateLocale the long id of this stack

end mouseUp
on mouseUp
   updateLocale the long id of this stack, "en"
end mouseUp
Description

Use the updateLocale command to update object properties based on the current language pack or any previously loaded language pack.

Tagsinternationalization,i18n,translation,languages,locale