x
This commit is contained in:
1 parent
6f67ee6077
commit
62db477dbd
13 files changed
+660
-98
No files matched your search
@@ -8,9 +8,6 @@ import zhTranslation from '../locales/zh/translation.json'
|
||||
import viTranslation from '../locales/vi/translation.json'
|
||||
import koTranslation from '../locales/ko/translation.json'
|
||||
|
||||
// Ensure we only access localStorage on the client side
|
||||
const savedLang = typeof window !== 'undefined' ? (localStorage.getItem('homaroma_lang') || 'th') : 'th'
|
||||
|
||||
// Check if it's already initialized to prevent re-initialization on HMR
|
||||
if (!i18n.isInitialized) {
|
||||
i18n
|
||||
@@ -24,7 +21,7 @@ if (!i18n.isInitialized) {
|
||||
vi: { translation: viTranslation },
|
||||
ko: { translation: koTranslation },
|
||||
},
|
||||
lng: savedLang, // default language
|
||||
lng: 'th',
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
escapeValue: false, // react already safes from xss
|
||||
|
||||
Reference in new issue
Block a user