How to use the @lingui/react.useLingui function in @lingui/react

To help you get started, we’ve selected a few @lingui/react 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 / react / src / helpers / Navigation.js View on Github external
export function Navigation() {
  const { i18n } = useLingui()
  const menu = (
    <menu>
      {Object.keys(locales).map(locale =&gt; (
         activate(locale)}&gt;
          {locales[locale]}
        
      ))}
    </menu>
  )
  return (
    
      <a>{locales[i18n.locale]}</a>
    
  )
}

@lingui/react

React components for translations

MIT
Latest version published 6 days ago

Package Health Score

98 / 100
Full package analysis