29 lines
882 B
JavaScript
29 lines
882 B
JavaScript
console.log("[DEBUG] i18n.js loaded!"); // very top
|
|
|
|
import { createI18n } from 'vue-i18n';
|
|
import en from './locales/en.json';
|
|
import ms from './locales/ms.json';
|
|
import tm from './locales/tm.json';
|
|
import bd from './locales/bd.json';
|
|
import my from './locales/my.json';
|
|
import np from './locales/np.json';
|
|
|
|
console.log("[DEBUG] en.json:", en);
|
|
console.log("[DEBUG] ms.json:", ms);
|
|
console.log("[DEBUG] tm.json:", tm);
|
|
console.log("[DEBUG] bd.json:", bd);
|
|
console.log("[DEBUG] my.json:", my);
|
|
console.log("[DEBUG] np.json:", np);
|
|
|
|
const i18n = createI18n({
|
|
legacy: false,
|
|
locale: 'en', // keep original; App.vue will override from localStorage
|
|
fallbackLocale: 'en',
|
|
messages: { en, ms, tm, bd, my, np } // register all locales here
|
|
});
|
|
|
|
console.log("[DEBUG] i18n instance created:", i18n);
|
|
export default i18n;
|
|
|
|
console.log("[DEBUG] i18n.js export complete");
|