fix: canonicalize widget date locales
This commit is contained in:
1 parent
2efa6bcd4c
commit
25b835dca9
9 files changed
+39
-11
No files matched your search
@@ -438,5 +438,13 @@ export type LanguageIconDefinition =
|
||||
|
||||
export { fallbackLocale } from "./languages";
|
||||
|
||||
const intlLocaleOverrides: Partial<Record<SupportedLanguage, string>> = {
|
||||
cn: "zh-CN",
|
||||
cr: "en",
|
||||
zh: "zh-TW",
|
||||
};
|
||||
|
||||
export const getIntlLocale = (locale: SupportedLanguage): string => intlLocaleOverrides[locale] ?? locale;
|
||||
|
||||
export const isLocaleRTL = (locale: SupportedLanguage) =>
|
||||
"isRTL" in localeConfigurations[locale] && localeConfigurations[locale].isRTL;
|
||||
Reference in new issue
Block a user