Search
Loading...
Skip to content

Class: InternationalizationAPI

Manages localization and internationalization settings for the Creative Editor SDK.

The InternationalisationAPI provides methods to get and set the current locale, as well as add custom translations for the editor interface.

Localization#

Methods for managing locale settings and custom translations within the editor.

getLocale()#


Gets the currently active locale.

Returns#

string

The currently set locale as a string, or the fallback locale if none is set.

Signature#

getLocale(): string

setLocale()#


Sets the active locale for the editor interface.

This will not check whether translations for the given locale are available.

Parameters#

ParameterTypeDescription
localestringThe locale string to set as active (e.g., ‘en’, ‘de’, ‘fr’).

Returns#

void


setTranslations()#


Adds custom translations for the editor interface.

This method allows you to provide custom translations that will be used by the editor interface. Translations are organized by locale and can override or extend the default editor translations.

Parameters#

ParameterTypeDescription
definition{ [locale: string]: object; }An object mapping locale strings to translation objects.

Returns#

void

Example#

setTranslations({
en: {
presets: {
scene: ...
}
}
})

Signature#

setTranslations(definition: object): void