1
0

feat(i18n): add Ukrainian for language selection in UI

This commit is contained in:
kolaente 2024-06-30 22:05:21 +02:00
parent 6d79eb0088
commit f6c041db5b
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,7 @@ export const SUPPORTED_LOCALES = {
'sl-SI': 'Slovenščina',
'pt-BR': 'Português Brasileiro',
'hr-HR': 'Hrvatski',
'uk-UA': 'українська',
// IMPORTANT: Also add new languages to useDayjsLanguageSync
} as const

View File

@ -24,6 +24,7 @@ export const DAYJS_LOCALE_MAPPING = {
'sl-SI': 'sl',
'pt-BR': 'pt',
'hr-HR': 'hr',
'uk-UA': 'uk',
} as Record<SupportedLocale, ISOLanguage>
export const DAYJS_LANGUAGE_IMPORTS = {
@ -46,6 +47,7 @@ export const DAYJS_LANGUAGE_IMPORTS = {
'ar-sa': () => import('dayjs/locale/ar-sa'),
'sl-si': () => import('dayjs/locale/sl'),
'pt-br': () => import('dayjs/locale/pt-br'),
'uk-ua': () => import('dayjs/locale/uk'),
} as Record<SupportedLocale, () => Promise<ILocale>>
export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {