I began to study the meteor for example GitHub - meteor/simple-todos-react: A repository that follows the React tutorial step-by-step
And I’m trying to add multilingual support.
I created file translated.
In the file /imports/ui/App.jsx I added code:
import i18n from 'meteor/universe:i18n';
i18n.setLocale('en-US');
const T = i18n.createComponent();
i18n.setLocale('en-US').then(function () {
console.log('hello');
});
And in render method I added:
. . . .
render() {
return (
<div className="container">
<header>
<h1>Todo List ({this.props.incompleteCount})</h1>
<T>hello </T>
<T _locale='ru-RU'>hello </T>
<T tagType='h1'>hello </T>
. . . .
file en-US.i18n.json
{ "hello": "hello world!" }
But the text is not translated as good examples unfortunately I have not found.
What am I doing wrong?