Switching displayed language - javascript API

With Localizer, you can use our custom Switch Language javascript code to switch your user to their desired language programmatically.

For example, if you receive a new sign up and recognize the user's language preference is French, your developer can place the relevant language code into the backend of your system and ensure that your user is displayed content in that language upon login.

The Switch Language code can also be added in instances where you don't want your user to change languages, or if there are certain other triggers where you need to select the display language for the user.

All relevant language codes can be found below:

 

To switch desired language programatically, use following codes:

Format:
Localizer.Switch([LanguageCode]);

Example javascript code (Switching to the German):
window.Localizer && Localizer.Switch("german");

Localizer language codes and their titles:
LanguageCode: "afrikaans", Title: "Afrikaans"
LanguageCode: "albanian", Title: "Albanian"
LanguageCode: "arabic", Title: "Arabic"
LanguageCode: "armenian", Title: "Armenian"
LanguageCode: "azerbaijani", Title: "Azerbaijani"
LanguageCode: "basque", Title: "Basque"
LanguageCode: "belarusian", Title: "Belarusian"
LanguageCode: "bengali", Title: "Bengali"
LanguageCode: "bosnian", Title: "Bosnian"
LanguageCode: "bulgarian", Title: "Bulgarian"
LanguageCode: "catalan", Title: "Catalan"
LanguageCode: "chinese-si", Title: "Chinese (Si.)"
LanguageCode: "chinese-tr", Title: "Chinese (Tr.)"
LanguageCode: "croatian", Title: "Croatian"
LanguageCode: "czech", Title: "Czech"
LanguageCode: "danish", Title: "Danish"
LanguageCode: "dutch", Title: "Dutch"
LanguageCode: "english", Title: "English"
LanguageCode: "english-au", Title: "English (AU)"
LanguageCode: "english-gb", Title: "English (GB)"
LanguageCode: "esperanto", Title: "Esperanto"
LanguageCode: "estonian", Title: "Estonian"
LanguageCode: "filipino", Title: "Filipino"
LanguageCode: "finnish", Title: "Finnish"
LanguageCode: "french", Title: "French"
LanguageCode: "french-ca", Title: "French (Canada)"
LanguageCode: "georgian", Title: "Georgian"
LanguageCode: "german", Title: "German"
LanguageCode: "greek", Title: "Greek"
LanguageCode: "hausa", Title: "Hausa"
LanguageCode: "hebrew", Title: "Hebrew"
LanguageCode: "hindi", Title: "Hindi"
LanguageCode: "hungarian", Title: "Hungarian"
LanguageCode: "icelandic", Title: "Icelandic"
LanguageCode: "indonesian", Title: "Indonesian"
LanguageCode: "italian", Title: "Italian"
LanguageCode: "japanese", Title: "Japanese"
LanguageCode: "korean", Title: "Korean"
LanguageCode: "latvian", Title: "Latvian"
LanguageCode: "lithuanian", Title: "Lithuanian"
LanguageCode: "macedonian", Title: "Macedonian"
LanguageCode: "malay", Title: "Malay"
LanguageCode: "malayalam", Title: "Malayalam"
LanguageCode: "maltese", Title: "Maltese"
LanguageCode: "marathi", Title: "Marathi"
LanguageCode: "mongolian", Title: "Mongolian"
LanguageCode: "myanmar", Title: "Myanmar (
LanguageCode: "nepali", Title: "Nepali"
LanguageCode: "norwegian", Title: "Norwegian"
LanguageCode: "persian", Title: "Persian"
LanguageCode: "polish", Title: "Polish"
LanguageCode: "portugues-br", Title: "Portuguese (Brazil)"
LanguageCode: "portuguese", Title: "Portuguese"
LanguageCode: "punjabi", Title: "Punjabi"
LanguageCode: "romanian", Title: "Romanian"
LanguageCode: "russian", Title: "Russian"
LanguageCode: "serbian", Title: "Serbian"
LanguageCode: "sinhala", Title: "Sinhala"
LanguageCode: "slovak", Title: "Slovak"
LanguageCode: "slovenian", Title: "Slovenian"
LanguageCode: "somali", Title: "Somali"
LanguageCode: "spanish", Title: "Spanish"
LanguageCode: "spanish-la", Title: "Spanish (LA)"
LanguageCode: "sudanese", Title: "Sudanese"
LanguageCode: "swahili", Title: "Swahili"
LanguageCode: "swedish", Title: "Swedish"
LanguageCode: "tamil", Title: "Tamil"
LanguageCode: "thai", Title: "Thai"
LanguageCode: "turkish", Title: "Turkish"
LanguageCode: "ukrainian", Title: "Ukrainian"
LanguageCode: "uzbek", Title: "Uzbek"
LanguageCode: "vietnamese", Title: "Vietnamese"
LanguageCode: "yiddish", Title: "Yiddish"