Load the translations for a specific language code
Definition
setLocale(locale: string)
This method sets the language of the player, to the given code, and thus loads the translations associated with that language. The language definition and codes need to exist in the org. Visit the Language doc for more information.
Parameter | Type | Description |
---|---|---|
locale | string | The code of the language to be loaded. This code needs to be defined in the org's Language section. |
player.setLocale('EN-US');
Usage
This method is intended to be used by the front-end whenever the configurator form UI needs to load the translations stored in the ThreeKit org for your given project. The player will feed the names of attributes, items, and tags to the front-end with the translations stored in the given language requested by this function.