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

Add Japanese locale to dfnshelper

This commit is contained in:
MrTimscampi 2020-04-07 19:46:47 +02:00
parent a5d8775611
commit 77d8226dd3

View file

@ -1,4 +1,4 @@
import { ar, be, bg, ca, cs, da, de, el, enGB, enUS, es, faIR, fi, fr, frCA, he, hi, hr, hu, id, it, kk, ko, lt, ms, nb,
import { ar, be, bg, ca, cs, da, de, el, enGB, enUS, es, faIR, fi, fr, frCA, he, hi, hr, hu, id, it, ja, kk, ko, lt, ms, nb,
nl, pl, ptBR, pt, ro, ru, sk, sl, sv, tr, uk, vi, zhCN, zhTW } from 'date-fns/locale';
import globalize from 'globalize';
@ -27,6 +27,7 @@ const dateLocales = (locale) => ({
'hu': hu,
'id': id,
'it': it,
'ja': ja,
'kk': kk,
'ko': ko,
'lt-lt': lt,
@ -50,7 +51,9 @@ const dateLocales = (locale) => ({
})[locale];
export function getLocale() {
return dateLocales(globalize.getCurrentLocale() || enUS);
console.warn(globalize.getCurrentLocale());
console.warn(dateLocales(globalize.getCurrentLocale()));
return dateLocales(globalize.getCurrentLocale()) || enUS;
}
export const localeWithSuffix = { addSuffix: true, locale: getLocale() };