Accueil > Fonctionnalités avancées > Switching displayed language - javascript API

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.

Le code Switch Language peut également être ajouté dans les cas où vous ne voulez pas que votre utilisateur change de langue, ou s'il ya certains autres déclencheurs où vous devez sélectionner la langue d'affichage pour l'utilisateur.

Tous les codes de langue pertinents se trouvent ci-dessous:

 

Pour changer la langue souhaitée par programmation, utilisez les codes suivants:

Format:
Localizer .Commutateur ([LanguageCode]);

Exemple de code javascript (Passage à l'allemand):
Window.Localizer && Localizer.Switch ( "allemand");

Codes de langage de localisation et leurs titres:
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"