Adds a language to the language dropdown (an item with the same code is replaced). When the language is selected, its pack locales/translation-{code}.json is loaded from the WebViewer path unless its translations were given with setTranslations.
locales/translation-{code}.json
setTranslations
{ code, name }.
{ code, name }
instance.UI.addLanguage({ code: 'de', name: 'Deutsch' });instance.UI.setTranslations('de', { common: { actions: { save: 'Speichern', cancel: 'Abbrechen' } } });await instance.UI.setLanguage('de'); Copy
instance.UI.addLanguage({ code: 'de', name: 'Deutsch' });instance.UI.setTranslations('de', { common: { actions: { save: 'Speichern', cancel: 'Abbrechen' } } });await instance.UI.setLanguage('de');
Adds a language to the language dropdown (an item with the same code is replaced). When the language is selected, its pack
locales/translation-{code}.jsonis loaded from the WebViewer path unless its translations were given withsetTranslations.