x
This commit is contained in:
1 parent
b7f337fb79
commit
bf9599008e
29 files changed
+3828
-1541
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import enTranslation from '../locales/en/translation.json'
|
||||
import thTranslation from '../locales/th/translation.json'
|
||||
import jaTranslation from '../locales/ja/translation.json'
|
||||
import zhTranslation from '../locales/zh/translation.json'
|
||||
import viTranslation from '../locales/vi/translation.json'
|
||||
import koTranslation from '../locales/ko/translation.json'
|
||||
import loTranslation from '../locales/lo/translation.json'
|
||||
import itTranslation from '../locales/it/translation.json'
|
||||
|
||||
export type TranslationSchema = typeof thTranslation
|
||||
|
||||
const translations: Record<string, TranslationSchema> = {
|
||||
th: thTranslation,
|
||||
en: enTranslation as TranslationSchema,
|
||||
ja: jaTranslation as TranslationSchema,
|
||||
zh: zhTranslation as TranslationSchema,
|
||||
vi: viTranslation as TranslationSchema,
|
||||
ko: koTranslation as TranslationSchema,
|
||||
lo: loTranslation as TranslationSchema,
|
||||
it: itTranslation as TranslationSchema,
|
||||
}
|
||||
|
||||
export function getServerTranslations(lang = 'th'): TranslationSchema {
|
||||
return translations[lang] ?? translations.en ?? translations.th
|
||||
}
|
||||
Reference in new issue
Block a user