| 79 | // If you want to add the language of your own country, you need to add the code here. |
| 80 | const messages: Record<string, any> = {}; |
| 81 | const normalizeLangModule = (langModule: any) => { |
| 82 | // `import.meta.glob` returns module objects; JSON content lives on `default`. |
| 83 | // Falling back keeps compatibility if a plugin already returns plain objects. |
| 84 | return langModule?.default ?? langModule; |
| 85 | }; |
| 86 | async function initI18n(lang: string) { |
| 87 | const { state } = useAppStateStore(); |
| 88 | lang = toStandardLang(lang); |