1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix locale with suffix

"Locale with suffix" is constructed only once with the initial
(browser) locale.
This commit is contained in:
Dmitry Lyzo 2022-10-06 11:38:05 +03:00
parent 354157c003
commit fe4ee0c101
5 changed files with 16 additions and 9 deletions

View file

@ -67,9 +67,14 @@ export function getLocale() {
return dateLocales(globalize.getCurrentLocale()) || dateLocales(globalize.getCurrentLocale().replace(/-.*/, '')) || enUS;
}
export const localeWithSuffix = { addSuffix: true, locale: getLocale() };
export function getLocaleWithSuffix() {
return {
addSuffix: true,
locale: getLocale()
};
}
export default {
getLocale: getLocale,
localeWithSuffix: localeWithSuffix
getLocaleWithSuffix
};