Methods
-
vcs.vcm.i18n.getInstance(){vcs.vcm.i18n}
-
Singleton getter for this class
-
vcs.vcm.i18n.getMessage(message_token)
-
returns a translated message depending on the current locale in the framework.
Name Type Description message_tokenstring the message token
-
vcs.vcm.i18n.registerLanguage(token, language, data)
-
is used to register a new language
Name Type Description tokenstring language token (en, de..)
languagestring full language description
dataObject.<string, string> -
vcs.vcm.i18n.setMessage(language, token, value)
-
overwrites the default translation or creates a new for a given language and String
Name Type Description languagestring language shortcut for example: de, en, nl
tokenstring the message_token to overwrite
valuestring the new message value
-
vcs.vcm.i18n.updateElement(elementToUpdate)
-
updates the textContent of an element after an data-{0,1,2,..} attribute of the element has changed
Name Type Description elementToUpdateElement -
getLocale(){string}
-
returns the current locale
Returns:
lang
-
getLocaleAwareString(value){string}
-
replaces $locale$ with the current locale string
Name Type Description valuestring -
getRegisteredLanguages()
-
returns an array of registered locales
-
setLocale(lang)
-
sets the new locale
Name Type Description langstring | null
virtualcityMAP 3.6