k-intl

0.8.0 • Public • Published

k-intl

React HOC to provide internationalization. This HOC uses intl-messageformat to format your text. (see full documentation)

CircleCI Coverage Status NPM Version Size Greenkeeper badge

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

alakarteio is created by two passionate french developers.

Do you want to contact them? Go to their website

Guillaume CRESPEL Fabien JUIF

/k-intl/

    Package Sidebar

    Install

    npm i k-intl

    Weekly Downloads

    5

    Version

    0.8.0

    License

    MIT

    Unpacked Size

    33.5 kB

    Total Files

    20

    Last publish

    Collaborators

    • guillaume.crespel