2.0.0 • Published 6 years ago

sdc-react-i18n v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

sdc-react-i18n

Travis npm package Coveralls

This package provides:

  • a Label component for rendering i18n texts.
  • a LanguagesMenu for switching the display language

Likewise, stores are provided that act as dumb containers and have no internal logic for loading any data:

  • a LabelsStore for managing the translations texts
  • a LanguagesStore for managing the available languages, in particular a default language and the currently selected language

All translation / texts need to be provided and either directly injected into the LabelsStore or published to the topic i18n.translations using the module ̀ sdc-publish-subscribe`.

labelsStore.setTranslations({...})

Likewise, all languages and in particular the default language need to be provided to the LanguagesStore, either directly or by publishing to i18n.languages.defined and i18n.languages.available.

languagesStore.setLanguages({...}) // keyed by language code
languagesStore.setDefaultLanguage('xx')
languagesStore.selectLanguage('xx')()
2.0.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago