feat(i18n): add persian to list of selectable languages
This commit is contained in:
parent
53d1fa0735
commit
adc8070ff9
|
|
@ -30,6 +30,7 @@ export const SUPPORTED_LOCALES = {
|
||||||
'ja-JP': '日本語',
|
'ja-JP': '日本語',
|
||||||
'hu-HU': 'Magyar',
|
'hu-HU': 'Magyar',
|
||||||
'ar-SA': 'اَلْعَرَبِيَّةُ',
|
'ar-SA': 'اَلْعَرَبِيَّةُ',
|
||||||
|
'fa-IR': 'فارسی',
|
||||||
'sl-SI': 'Slovenščina',
|
'sl-SI': 'Slovenščina',
|
||||||
'pt-BR': 'Português Brasileiro',
|
'pt-BR': 'Português Brasileiro',
|
||||||
'hr-HR': 'Hrvatski',
|
'hr-HR': 'Hrvatski',
|
||||||
|
|
@ -52,7 +53,7 @@ export const DEFAULT_LANGUAGE: SupportedLocale= 'en'
|
||||||
|
|
||||||
export type ISOLanguage = string
|
export type ISOLanguage = string
|
||||||
|
|
||||||
const RTL_LANGUAGES = ['ar-SA', 'he-IL'] as const
|
const RTL_LANGUAGES = ['ar-SA', 'he-IL', 'fa-IR'] as const
|
||||||
|
|
||||||
export function isRTLLanguage(locale: SupportedLocale): boolean {
|
export function isRTLLanguage(locale: SupportedLocale): boolean {
|
||||||
return RTL_LANGUAGES.includes(locale as typeof RTL_LANGUAGES[number])
|
return RTL_LANGUAGES.includes(locale as typeof RTL_LANGUAGES[number])
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ export const DAYJS_LOCALE_MAPPING = {
|
||||||
'ja-jp': 'ja',
|
'ja-jp': 'ja',
|
||||||
'hu-hu': 'hu',
|
'hu-hu': 'hu',
|
||||||
'ar-sa': 'ar-sa',
|
'ar-sa': 'ar-sa',
|
||||||
|
'fa-ir': 'fa',
|
||||||
'sl-si': 'sl',
|
'sl-si': 'sl',
|
||||||
'pt-br': 'pt',
|
'pt-br': 'pt',
|
||||||
'hr-hr': 'hr',
|
'hr-hr': 'hr',
|
||||||
|
|
@ -55,6 +56,7 @@ export const DAYJS_LANGUAGE_IMPORTS = {
|
||||||
'ja-jp': () => import('dayjs/locale/ja'),
|
'ja-jp': () => import('dayjs/locale/ja'),
|
||||||
'hu-hu': () => import('dayjs/locale/hu'),
|
'hu-hu': () => import('dayjs/locale/hu'),
|
||||||
'ar-sa': () => import('dayjs/locale/ar-sa'),
|
'ar-sa': () => import('dayjs/locale/ar-sa'),
|
||||||
|
'fa-ir': () => import('dayjs/locale/fa'),
|
||||||
'sl-si': () => import('dayjs/locale/sl'),
|
'sl-si': () => import('dayjs/locale/sl'),
|
||||||
'pt-br': () => import('dayjs/locale/pt-br'),
|
'pt-br': () => import('dayjs/locale/pt-br'),
|
||||||
'hr-hr': () => import('dayjs/locale/hr'),
|
'hr-hr': () => import('dayjs/locale/hr'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue