function mapLocale()

in BuildAnIntelligentBot/src/ChatBot/wwwroot/built/Strings.js [417:493]


function mapLocale(locale) {
    locale = locale && locale.toLowerCase();
    if (locale in localizedStrings) {
        return locale;
    }
    else if (locale.startsWith('cs')) {
        return 'cs-cz';
    }
    else if (locale.startsWith('da')) {
        return 'da-dk';
    }
    else if (locale.startsWith('de')) {
        return 'de-de';
    }
    else if (locale.startsWith('el')) {
        return 'el-gr';
    }
    else if (locale.startsWith('es')) {
        return 'es-es';
    }
    else if (locale.startsWith('fi')) {
        return 'fi-fi';
    }
    else if (locale.startsWith('fr')) {
        return 'fr-fr';
    }
    else if (locale.startsWith('hu')) {
        return 'hu-hu';
    }
    else if (locale.startsWith('it')) {
        return 'it-it';
    }
    else if (locale.startsWith('ja')) {
        return 'ja-jp';
    }
    else if (locale.startsWith('ko')) {
        return 'ko-kr';
    }
    else if (locale.startsWith('lv')) {
        return 'lv-lv';
    }
    else if (locale.startsWith('nb') || locale.startsWith('nn') || locale.startsWith('no')) {
        return 'nb-no';
    }
    else if (locale.startsWith('nl')) {
        return 'nl-nl';
    }
    else if (locale.startsWith('pl')) {
        return 'pl-pl';
    }
    else if (locale.startsWith('pt')) {
        if (locale === 'pt-br') {
            return 'pt-br';
        }
        else {
            return 'pt-pt';
        }
    }
    else if (locale.startsWith('ru')) {
        return 'ru-ru';
    }
    else if (locale.startsWith('sv')) {
        return 'sv-se';
    }
    else if (locale.startsWith('tr')) {
        return 'tr-tr';
    }
    else if (locale.startsWith('zh')) {
        if (locale === 'zh-hk' || locale === 'zh-mo' || locale === 'zh-tw') {
            return 'zh-hant';
        }
        else {
            return 'zh-hans';
        }
    }
    return 'en-us';
}