Remove language normalization - use original language
Otherwise `pt-PT` is replaced by `pt`, but they have different translations.
This commit is contained in:
parent
aa418cbf41
commit
3badb21b00
2 changed files with 12 additions and 24 deletions
|
@ -60,7 +60,7 @@ const dateLocales = (locale) => ({
|
|||
})[locale];
|
||||
|
||||
export function getLocale() {
|
||||
return dateLocales(globalize.getCurrentLocale()) || enUS;
|
||||
return dateLocales(globalize.getCurrentLocale()) || dateLocales(globalize.getCurrentLocale().replace(/-.*/, '')) || enUS;
|
||||
}
|
||||
|
||||
export const localeWithSuffix = { addSuffix: true, locale: getLocale() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue