k-intl
v0.8.0
Published
React HOC to provide internationalization
Downloads
23
Readme
k-intl
React HOC to provide internationalization.
This HOC uses intl-messageformat
to format your text. (see full documentation)
Installation
yarn add k-intl
npm install --save k-intl
How to use me?
Load locale on your store with this path: store.config.locale
/* en.json */
{
"meeseeks": {
"sayHello": "I'm Mr. Meeseeks!"
}
}
Wrap your component with container
/* meeseeks.container.js */
import intl from 'k-intl'
import Component from './meeseeks.jsx'
export default intl('meeseeks')(Component)
And use the provided props messages
on your component
/* meeseeks.jsx */
export default ({ messages }) => <div>{messages.sayHello}</div>
About
alakarteio is created by two passionate french developers.
Do you want to contact them? Go to their website