Skip to content

Commit

Permalink
refactor(app): update i18n path
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao authored Nov 16, 2023
1 parent 2e00f75 commit d57f184
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/current/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ const resources = {};

// programatically load all locales
for await (const language of LANGUAGE_LIST) {
// load ui namespace
const ui = await import(`./locales/${language.locale}/ui.json`).then((module) => module.default);
// load source namespace
const source = await import(`./locales/${language.locale}/source.json`).then((module) => module.default);
// load ui namespace
const ui = await import(`../shared/locales/${language.locale}/ui.json`).then((module) => module.default);
// load source namespace
const source = await import(`../shared/locales/${language.locale}/source.json`).then((module) => module.default);

resources[language.code] = {
ui,
source,
};
resources[language.code] = {
ui,
source,
};
}

i18n.use(initReactI18next).init({
resources,
lng: 'e',
fallbackLng: 'e',
keySeparator: true,
interpolation: { escapeValue: false },
resources,
lng: 'e',
fallbackLng: 'e',
keySeparator: true,
interpolation: { escapeValue: false },
});

export default i18n;

0 comments on commit d57f184

Please sign in to comment.