TomTom Maps for JavaScript
    Preparing search index...

    Variable languagesConst

    languages: readonly [
        "ngt",
        "ngt-Latn",
        "ar",
        "eu-ES",
        "bg-BG",
        "ca-ES",
        "zh-Hant",
        "zh-Hans",
        "hr-HR",
        "cs-CZ",
        "da-DK",
        "nl-NL",
        "en-AU",
        "en-CA",
        "en-GB",
        "en-NZ",
        "en-US",
        "et-EE",
        "fi-FI",
        "fr-FR",
        "gl-ES",
        "de-DE",
        "el-GR",
        "he-IL",
        "hi-IN",
        "hu-HU",
        "id-ID",
        "it-IT",
        "ja-JP",
        "kk-KZ",
        "ko-KR",
        "ko-Latn-KR",
        "lv-LV",
        "lt-LT",
        "ms-MY",
        "nb-NO",
        "pl-PL",
        "pt-BR",
        "pt-PT",
        "ro-RO",
        "ru-RU",
        "ru-Latn-RU",
        "ru-Cyrl-RU",
        "sr-RS",
        "sk-SK",
        "sl-SI",
        "es-ES",
        "es-MX",
        "sv-SE",
        "th-TH",
        "tr-TR",
        "uk-UA",
    ] = ...

    All supported language codes for map display and service responses.

    They set the language of map labels, place names, addresses and other textual content.

    Use it to check whether a user-provided language code is supported, to generate language selection UI or to iterate over all language options.

    // Validate a language code
    const userLanguage: string = 'en-US';
    const knownLanguages: readonly string[] = languages;
    if (knownLanguages.includes(userLanguage)) {
    console.log('Language is supported');
    }