Example for universe-i18n and react-todos together

I began to study the meteor for example https://github.com/meteor/simple-todos-react
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';


const T = i18n.createComponent();

i18n.setLocale('en-US').then(function () {

And in render method I added:

 . . . . 
  render() {
    return (
      <div className="container">
          <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?

I had the same problem and I noticed that you should put your lang files outside imports directory. For example you can put your files in root.





If you wont to put translation files in imports directory you should compile them to JS