feat: implement i18n for product and category, add 5 new locales
This commit is contained in:
1 parent
b867063efb
commit
96d874233d
17 files changed
+557
-62
No files matched your search
@@ -3,6 +3,10 @@ import { initReactI18next } from 'react-i18next'
|
||||
|
||||
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"
|
||||
|
||||
// Retrieve default lang from localStorage if set
|
||||
const savedLang = localStorage.getItem('homaroma_lang') || 'th'
|
||||
@@ -13,6 +17,10 @@ i18n
|
||||
resources: {
|
||||
en: { translation: enTranslation },
|
||||
th: { translation: thTranslation },
|
||||
ja: { translation: jaTranslation },
|
||||
zh: { translation: zhTranslation },
|
||||
vi: { translation: viTranslation },
|
||||
ko: { translation: koTranslation },
|
||||
},
|
||||
lng: savedLang, // default language (Thai)
|
||||
fallbackLng: 'en',
|
||||
|
||||
Reference in new issue
Block a user