0.1.0 • Published 1 year ago

@nexys/react-i18n v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

I18n for React

NPM package NPM package

Prettier Test Package Publish

I18n implementation.

Features

  • get strings from a backend
  • strings are cached in the local store
  • untranslated strings are added to the local store

Get Started

Installation

yarn add @nexys/react-i18n

Intialization

import I18nService from '@nexys/react-i18n';

const i18n = new I18n(); // this needs to be done once
i18n.init(); // gets the strings

i18n.translate('myStringToBeTranslated')

With wrapper

import I18nService from '@nexys/react-i18n';

const i18n = new I18n(); // this needs to be done once

const UI = () => <p>{i18n.translate('myStringToBeTranslated')}</p>;

export default Wrapper(i18n, UI);

see https://github.com/nexys-system/react-i18n/blob/master/src/app.tsx for more information.

0.1.0

1 year ago

0.0.12

3 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago