npm.io
10.0.3 • Published 5 months ago

@graphcommerce/lingui-next

Licence
Version
10.0.3
Deps
0
Size
24 kB
Vulns
0
Weekly
0
Stars
360

@graphcommerce/lingui-next

This package adds lingui to GraphCommerce

Installation

  1. Create a lingui.config.js with the lingui config. example
  2. Add <LinguiProvider/> to your pages/_app.tsx file example
  3. Wrap you static getInitialProps with linguiWrapGetInitialProps in to your pages/_document.tsx file example
  4. Run NODE_ENV=development yarn lingui extract to extact messages for your locale.

Configuration

Configure the following (configuration values) in your graphcommerce.config.js

Extracting messages

Run NODE_ENV=development yarn lingui extract