Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function activate(locale) {
const catalog = await import(
/* webpackChunkName: "i18n-[index]" */ `@lingui/loader!./locales/${locale}.po`
)
i18n.load(locale, catalog)
i18n.activate(locale)
}
export async function activate(locale) {
/* webpackMode: "lazy", webpackChunkName: "i18n-[index]" */
const catalog = await import(`@lingui/loader!./locales/${locale}.po`)
i18n.load(locale, catalog)
i18n.activate(locale)
}
export const getI18n = createSelector([getLanguage, getCatalog], (language, catalog) => {
i18n.load({ [language]: catalog });
i18n.activate(language);
return i18n;
});