Skip to content

Commit dcc81ea

Browse files
author
Joao Moura
committed
Readme update
1 parent 2f4d1da commit dcc81ea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ import * as React from 'react'
2121
import { setTranslations, setDefaultLanguage, translate } from 'react-multi-lang'
2222
import pt from '.pt.json'
2323
import en from '.en.json'
24+
import type { T } from 'react-multi-lang'
2425

2526
// Do this two lines only when setting up the application
2627
setTranslations({pt, en})
2728
setDefaultLanguage('en')
2829

2930
type Props = {
30-
translate:(string) => string
31+
t: T
3132
}
3233

3334
type State = {}
@@ -37,7 +38,7 @@ class SomeComponent extends React.Component<Props, State> {
3738
const { translate } = this.props
3839
return (
3940
<div>
40-
{translate('About Us')}
41+
{t('Hello', {name: 'João'})}
4142
</div>
4243
)
4344
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-multi-lang",
3-
"version": "0.1.1",
3+
"version": "0.1.1.1",
44
"description": "React Multilanguage Higher-Order Component",
55
"main": "lib/index.js",
66
"files": [

0 commit comments

Comments
 (0)