Skip to content

Commit

Permalink
Readme: Added I18nProvider section
Browse files Browse the repository at this point in the history
  • Loading branch information
alexblunck committed May 15, 2018
1 parent 16e6998 commit b9b28f2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,15 @@ import { __ } from '@blunck/react-i18n'
const str = __('noun.country')
```

## I18nProvider
Use the `I18nProvider` component to access the locale from within your own components
```js
import { I18nProvider } from '@blunck/react-i18n'

<I18nProvider render={locale => (
<span>The current locale is {locale}</span>
)} />
```

## Acknowledgments
Architecture inspired by [react-i18nify](https://github.com/JSxMachina/react-i18nify)

0 comments on commit b9b28f2

Please sign in to comment.