Skip to content

Commit

Permalink
Merge branch 'release/0.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
hulin32 committed Jun 17, 2018
2 parents 45b9395 + b26a64a commit 5e1f999
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

## How to run the demo
```bash
yarn
yarn start
npm install
npm run start
```

## How to use this in your project
include the `IntlProvider` file in your souce file
```js
npm install --save react-i18context
```

# API
## 1.IntlProvider
Expand All @@ -33,4 +35,11 @@ include the `IntlProvider` file in your souce file
<DefineLangue locale={lang}>
<button>change language</button>
</DefineLangue>
```

## 4. InjectIntlLangWrapper

```js
// in the FooComponent props will inject the changeLan method, so you can chnage the language manually
InjectIntlLangWrapper(FooComponent)
```
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"name": "react-i18context",
"version": "0.1.5",
"version": "0.1.6",
"description": "simple react i18 component",
"main": "dist/index.js",
"directories": {
"example": "examples"
},
"homepage": "https://github.com/flyingalex/react-i18context",
"scripts": {
"start": "webpack-dev-server --mode development",
"transpile": "babel src -d dist --copy-files",
Expand Down

0 comments on commit 5e1f999

Please sign in to comment.