How to use the @lingui/core.i18n.load function in @lingui/core

To help you get started, we’ve selected a few @lingui/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lingui / js-lingui / examples / create-react-app / src / i18n.config.js View on Github external
export async function activate(locale) {
  const catalog = await import(
    /* webpackChunkName: "i18n-[index]" */ `@lingui/loader!./locales/${locale}.po`
  )

  i18n.load(locale, catalog)
  i18n.activate(locale)
}
github lingui / js-lingui / examples / react / src / i18n.config.js View on Github external
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)
}
github setusoft / silhouette-play-react-seed / app-ui / src / selectors / I18nSelector.js View on Github external
export const getI18n = createSelector([getLanguage, getCatalog], (language, catalog) => {
  i18n.load({ [language]: catalog });
  i18n.activate(language);

  return i18n;
});