feat(i18n): change location of translation files

This commit is contained in:
Amruth Pillai
2023-11-10 09:29:52 +01:00
parent c52a0d4da7
commit 69d3cd899c
4 changed files with 12 additions and 7 deletions

View File

@ -1,15 +1,15 @@
import { i18n } from "@lingui/core";
import { t } from "@lingui/macro";
export const defaultLocale = "en-US";
export const getLocales = () => ({
"en-US": t`English`,
"de-DE": t`German`,
});
export const defaultLocale = "en-US";
export async function dynamicActivate(locale: string) {
const { messages } = await import(`../locales/${locale}.po`);
const { messages } = await import(`../locales/${locale}/messages.po`);
i18n.load(locale, messages);
i18n.activate(locale);