feat(lang): add Arabic and Lithuanian display languages (#2916)

pull/2919/head
TheCatLady 2 years ago committed by GitHub
parent 1fcfe93b58
commit 3db3044210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
import React from 'react';
export type AvailableLocale =
| 'ar'
| 'ca'
| 'cs'
| 'da'
@ -9,10 +10,11 @@ export type AvailableLocale =
| 'en'
| 'el'
| 'es'
| 'it'
| 'ja'
| 'fr'
| 'hu'
| 'it'
| 'ja'
| 'lt'
| 'nb-NO'
| 'nl'
| 'pl'
@ -63,6 +65,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'it',
display: 'Italiano',
},
lt: {
code: 'lt',
display: 'Lietuvių',
},
hu: {
code: 'hu',
display: 'Magyar',
@ -107,6 +113,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'sr',
display: 'српски језик',
},
ar: {
code: 'ar',
display: 'العربية',
},
ja: {
code: 'ja',
display: '日本語',

@ -25,6 +25,8 @@ import '../styles/globals.css';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
switch (locale) {
case 'ar':
return import('../i18n/locale/ar.json');
case 'ca':
return import('../i18n/locale/ca.json');
case 'cs':
@ -39,12 +41,14 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/es.json');
case 'fr':
return import('../i18n/locale/fr.json');
case 'hu':
return import('../i18n/locale/hu.json');
case 'it':
return import('../i18n/locale/it.json');
case 'ja':
return import('../i18n/locale/ja.json');
case 'hu':
return import('../i18n/locale/hu.json');
case 'lt':
return import('../i18n/locale/lt.json');
case 'nb-NO':
return import('../i18n/locale/nb_NO.json');
case 'nl':

Loading…
Cancel
Save