mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat(i18n): initialize internationalization and update Vite config for locale handling
- Added `initI18n` function call in `main.tsx` to bootstrap internationalization before rendering the app. - Updated Vite configuration to handle specific locale files for English and Chinese.
This commit is contained in:
@@ -28,6 +28,18 @@ export default defineConfig({
|
||||
|
||||
const normalized = id.replace(/\\/g, '/');
|
||||
|
||||
if (normalized.includes('/src/lib/i18n/locales/en.ts')) {
|
||||
return 'i18n-en';
|
||||
}
|
||||
|
||||
if (normalized.includes('/src/lib/i18n/locales/zh-CN.ts')) {
|
||||
return 'i18n-zh-CN';
|
||||
}
|
||||
|
||||
if (normalized.includes('/src/lib/i18n.ts')) {
|
||||
return 'i18n-core';
|
||||
}
|
||||
|
||||
if (
|
||||
normalized.includes('/src/components/AuthViews.tsx') ||
|
||||
normalized.includes('/src/components/PublicSendPage.tsx') ||
|
||||
|
||||
Reference in New Issue
Block a user