feat(lang): add lang config for Bulgarian, Finnish, Ukrainian, Indonesian, Slovak, Turkish and Maori (#3834)

pull/3831/head^2
Jordan Jones 7 months ago committed by GitHub
parent 36283f214a
commit b6fe5ac637
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,6 +2,7 @@ import React from 'react';
export type AvailableLocale = export type AvailableLocale =
| 'ar' | 'ar'
| 'bg'
| 'ca' | 'ca'
| 'cs' | 'cs'
| 'da' | 'da'
@ -9,8 +10,11 @@ export type AvailableLocale =
| 'en' | 'en'
| 'el' | 'el'
| 'es' | 'es'
| 'fi'
| 'fr' | 'fr'
| 'hr' | 'hr'
| 'he'
| 'hi'
| 'hu' | 'hu'
| 'it' | 'it'
| 'ja' | 'ja'
@ -21,10 +25,12 @@ export type AvailableLocale =
| 'pl' | 'pl'
| 'pt-BR' | 'pt-BR'
| 'pt-PT' | 'pt-PT'
| 'ro'
| 'ru' | 'ru'
| 'sq' | 'sq'
| 'sr' | 'sr'
| 'sv' | 'sv'
| 'uk'
| 'zh-CN' | 'zh-CN'
| 'zh-TW'; | 'zh-TW';
@ -34,6 +40,10 @@ type AvailableLanguageObject = Record<
>; >;
export const availableLanguages: AvailableLanguageObject = { export const availableLanguages: AvailableLanguageObject = {
bg: {
code: 'bg',
display: 'Bulgarian',
},
ca: { ca: {
code: 'ca', code: 'ca',
display: 'Català', display: 'Català',
@ -58,10 +68,22 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'es', code: 'es',
display: 'Español', display: 'Español',
}, },
fi: {
code: 'fi',
display: 'Finnish',
},
fr: { fr: {
code: 'fr', code: 'fr',
display: 'Français', display: 'Français',
}, },
he: {
code: 'he',
display: 'Hebrew',
},
hi: {
code: 'hi',
display: 'Hindi',
},
hr: { hr: {
code: 'hr', code: 'hr',
display: 'Hrvatski', display: 'Hrvatski',
@ -110,6 +132,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'el', code: 'el',
display: 'Ελληνικά', display: 'Ελληνικά',
}, },
ro: {
code: 'ro',
display: 'Romanian',
},
ru: { ru: {
code: 'ru', code: 'ru',
display: 'pусский', display: 'pусский',
@ -130,6 +156,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'ko', code: 'ko',
display: '한국어', display: '한국어',
}, },
uk: {
code: 'uk',
display: 'українська мова',
},
'zh-TW': { 'zh-TW': {
code: 'zh-TW', code: 'zh-TW',
display: '繁體中文', display: '繁體中文',

@ -28,6 +28,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
switch (locale) { switch (locale) {
case 'ar': case 'ar':
return import('../i18n/locale/ar.json'); return import('../i18n/locale/ar.json');
case 'bg':
return import('../i18n/locale/bg.json');
case 'ca': case 'ca':
return import('../i18n/locale/ca.json'); return import('../i18n/locale/ca.json');
case 'cs': case 'cs':
@ -40,8 +42,14 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/el.json'); return import('../i18n/locale/el.json');
case 'es': case 'es':
return import('../i18n/locale/es.json'); return import('../i18n/locale/es.json');
case 'fi':
return import('../i18n/locale/fi.json');
case 'fr': case 'fr':
return import('../i18n/locale/fr.json'); return import('../i18n/locale/fr.json');
case 'he':
return import('../i18n/locale/he.json');
case 'hi':
return import('../i18n/locale/hi.json');
case 'hr': case 'hr':
return import('../i18n/locale/hr.json'); return import('../i18n/locale/hr.json');
case 'hu': case 'hu':
@ -64,6 +72,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/pt_BR.json'); return import('../i18n/locale/pt_BR.json');
case 'pt-PT': case 'pt-PT':
return import('../i18n/locale/pt_PT.json'); return import('../i18n/locale/pt_PT.json');
case 'ro':
return import('../i18n/locale/ro.json');
case 'ru': case 'ru':
return import('../i18n/locale/ru.json'); return import('../i18n/locale/ru.json');
case 'sq': case 'sq':
@ -72,6 +82,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/sr.json'); return import('../i18n/locale/sr.json');
case 'sv': case 'sv':
return import('../i18n/locale/sv.json'); return import('../i18n/locale/sv.json');
case 'uk':
return import('../i18n/locale/uk.json');
case 'zh-CN': case 'zh-CN':
return import('../i18n/locale/zh_Hans.json'); return import('../i18n/locale/zh_Hans.json');
case 'zh-TW': case 'zh-TW':

Loading…
Cancel
Save