Closed sibelius closed 5 years ago
import { withTranslation } from 'react-i18next'; export default withTranslation()(MyComponent);
t
Example
before:
import React from 'react'; const Simple = () => ( <span>My simple text</span> );
after
import React from 'react'; import { withTranslation } from 'react-i18next'; const Simple = ({ t } ) => ( <span>{t('my_simple_text')}</span> ); export default withTranslation()(Simple);
I think we are good enough for now
t
functionExample
before:
after