This commit is contained in:
Your Name committed 2026-06-18 18:42:39 -04:00
1 parent 6f67ee6077
commit 62db477dbd
13 files changed
+660 -98

No files matched your search

+1 -4
View File
@@ -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