@@ -38,6 +38,7 @@ class SomeComponent extends React.Component<Props, State> {
3838 const { translate } = this .props
3939 return (
4040 < div>
41+ {t (' home.Title' )}
4142 {t (' Hello' , {name: ' João' })}
4243 < / div>
4344 )
@@ -51,53 +52,52 @@ export default translate(SomeComponent)
5152
5253If using the Higher Order Component ` translate(SomeComponent) `
5354
54- #### t(key, params)
55-
56- | Params | Type | Description |
57- | ------------- | :-------------:| ------------ |
58- | key | string | translation key that identifies the text |
59- | params | object | {'param': 'value', ...} each param will be set on the string in its correct location |
55+ ### t(path, params)
6056
57+ Params | Type | Description
58+ ------ | ------ | ------------------------------------------------------------------------------------
59+ path | string | translation path that identifies the text
60+ params | object | {'param': 'value', ...} each param will be set on the string in its correct location
6161
6262## Exported Methods
6363
64- #### setDefaultTranslations(translations)
64+ ### setDefaultTranslations(translations)
6565
6666Sets the translations
6767
68- | Params | Type | Description |
69- | ------------- | : -------------: | ------------ |
70- | translations | object | {'key': 'translations', ...} |
68+ Params | Type | Description
69+ ------------ | ------ | ----------------------------
70+ translations | object | {'key': 'translations', ...}
7171
72- #### setTranslations(translations)
72+ ### setTranslations(translations)
7373
7474Same as setDefaultTranslations, but this will update all components using translations
7575
76- | Params | Type | Description |
77- | ------------- | : -------------: | ------------ |
78- | translations | object | {'key': 'translations', ...} |
76+ Params | Type | Description
77+ ------------ | ------ | ----------------------------
78+ translations | object | {'key': 'translations', ...}
7979
80- #### setDefaultLanguage(key)
80+ ### setDefaultLanguage(key)
8181
8282Sets the default application language
8383
84- | Params | Type | Description |
85- | ------------- | : -------------: | ------------ |
86- | key | string | translation key, in this example 'en' or 'pt' |
84+ Params | Type | Description
85+ ------ | ------ | ---------------------------------------------
86+ key | string | translation key, in this example 'en' or 'pt'
8787
88- #### setLanguage(key)
88+ ### setLanguage(key)
8989
9090Same as setDefaultLanguage, but this will update all components using translations
9191
92- | Params | Type | Description |
93- | ------------- | : -------------: | ------------ |
94- | key | string | translation key, in this example 'en' or 'pt' |
92+ Params | Type | Description
93+ ------ | ------ | ---------------------------------------------
94+ key | string | translation key, in this example 'en' or 'pt'
9595
96- #### t(key, params)
96+ ### t(key, params)
9797
9898Get text function, will return the translated string
9999
100- | Params | Type | Description |
101- | ------------- | : -------------: | ------------ |
102- | key | string | translation key that identifies the text |
103- | params | object | {'param': 'value', ...} each param will be set on the string in its correct location |
100+ Params | Type | Description
101+ ------ | ------ | ------------------------------------------------------------------------------------
102+ key | string | translation key that identifies the text
103+ params | object | {'param': 'value', ...} each param will be set on the string in its correct location
0 commit comments