npm install
npm run start
How to use this in your project
npm install --save react-i18context
// messages is an array object, key is the languae, see the demo
<IntlProvider messages={messages} locale="en">
<App />
</IntlProvider>
// id is the text you want to translate
<FormatMsg id="test" />
// locale is the language you want to use when you click this button
<LocaleSet locale={lang}>
<button>change language</button>
</LocaleSet>
// in the FooComponent props will inject the setLocale method, so you can chnage the language manually
InjectIntlLangWrapper(FooComponent)