This is the documentation of version 1.0.0-rc.3. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Variable languagesConst

    languages: readonly [
        "ngt",
        "ngt-Latn",
        "ar",
        "bg-BG",
        "zh-Hant",
        "zh-Hans",
        "cs-CZ",
        "da-DK",
        "nl-NL",
        "en-AU",
        "en-CA",
        "en-GB",
        "en-NZ",
        "en-US",
        "fi-FI",
        "fr-FR",
        "de-DE",
        "el-GR",
        "hu-HU",
        "id-ID",
        "it-IT",
        "ko-KR",
        "ko-Latn-KR",
        "lt-LT",
        "ms-MY",
        "nb-NO",
        "pl-PL",
        "pt-BR",
        "pt-PT",
        "ru-RU",
        "ru-Latn-RU",
        "ru-Cyrl-RU",
        "sk-SK",
        "sl-SI",
        "es-ES",
        "es-MX",
        "sv-SE",
        "th-TH",
        "tr-TR",
    ] = ...

    All supported language codes for map display and service responses.

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

    The array includes:

    • Region-specific language variants (e.g., en-US, en-GB, pt-BR, pt-PT)
    • Script-specific variants (e.g., zh-Hans for Simplified Chinese, zh-Hant for Traditional Chinese)
    • Special codes like ngt (Neutral Ground Truth) for language-neutral content
    • Latin script alternatives (e.g., ngt-Latn, ko-Latn-KR, ru-Latn-RU)
    • Cyrillic script variants (e.g., ru-Cyrl-RU)

    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 = 'en-US';
    if (languages.includes(userLanguage)) {
    console.log('Language is supported');
    }

    // Create a language selector
    languages.forEach(lang => {
    console.log(`Available language: ${lang}`);
    });

    // Check total number of supported languages
    console.log(`Total languages: ${languages.length}`);