From b9b28f2e125b771961600d8c127a88f7c22d2673 Mon Sep 17 00:00:00 2001 From: Alexander Blunck Date: Tue, 15 May 2018 19:21:32 +0200 Subject: [PATCH] Readme: Added I18nProvider section --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 2913c94..d6acbd1 100644 --- a/README.md +++ b/README.md @@ -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' + + ( + The current locale is {locale} +)} /> +``` + ## Acknowledgments Architecture inspired by [react-i18nify](https://github.com/JSxMachina/react-i18nify)