feat(i18n): implement localization using LinguiJS

This commit is contained in:
Amruth Pillai
2023-11-10 09:07:47 +01:00
parent 13d91411e3
commit 6ad4358d70
108 changed files with 4631 additions and 798 deletions

View File

@ -0,0 +1,16 @@
import { i18n } from "@lingui/core";
import { t } from "@lingui/macro";
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`);
i18n.load(locale, messages);
i18n.activate(locale);
}