React component to use node-polyglot
Install
npm install react-node-polyglot
You also need to install peer dependencies by yourself
npm install node-polyglot // v2.x.x
npm install react // v16.x.x
npm install prop-types // v15.x.x
This module targets Node.js 8 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers use Babel compiler.
Usage
const Provider withPolyglot useT useLocale = ; const PolyglotHOC = ; const PolyglotHook = // locale object that is passed to provider const locale = ; const t = ; return ;; const App = <Provider => <PolyglotHOC /> <PolyglotHook /> </Provider>;
License
MIT © Abylay Keldibek