I18n Language Translation in Meteor-React


#1

How can i translate whole meteor-react app or website in Arabic?
I have tried universe:i18n packages, but its not working.
Here is what i have done:

import i18n from 'meteor/universe:i18n';
i18n.setLocale('ar-SA');
i18n.getLocale();
const T = i18n.createComponent();

Then i added div inside the component i have created for translation.

<T> Here is my content </T>

But it gives me same result as before(i.e. English).

Is there any quick way to translate full App/Website?


#2

You need to create translation JSON files for every language, like ˋen.jsonˋ and ˋar-sa.jsonˋ. Then, replace all your English text inside the ˋTˋ elements by the key defined in these JSON files.


#3

Looks like it doesn’t work with meteor 1.7