INNER CODE UNIT · TypeScript
cb
bunny-mod/Bunny · src/core/i18n/index.ts:27
const cb = ({ locale }: { locale: string; }) => {
const languageMap = {
"es-ES": "es",
"es-419": "es_419",
"zh-TW": "zh-Hant",
"zh-CN": "zh-Hans",
"pt-PT": "pt",
"pt-BR": "pt_BR",
"sv-SE": "sv"
} as Record<string, string>;
const resolvedLocale = _lastSetLocale = languageMap[locale] ?? locale;
if (resolvedLocale.startsWith("en-")) {
_currentLocale = null;
return;
}