3

I am building a web application with Meteor and Angular2. I need the application to support 4 languages. I am basing my project on Uri Goldshtein's boilerplate https://github.com/Urigo/angular2-meteor-base.

Which is the recommended way to implement internationalization when using Angular2+Meteor?

chazsolo
  • 7,873
  • 1
  • 20
  • 44
Diego A.
  • 85
  • 5

2 Answers2

3

You might read my article https://medium.com/@jamuhl/i18n-frameworks-the-unfair-showdown-8d436cd6f470 - using a framework specific solution is not always the best thing to do...

i would recommend looking into a i18n lib that is more mature - i18next, formatjs, polyglot,...

Further you should not only consider that you have to instrument your code (i18n) to get your app/website translated. You should think about the process too - how will you solve continuous localization, how you keep track of progress, ... http://locize.com/2016-10-05-continuous-development-integration-and-localization-cd/

For a translation management+ system you might eg. have a look at locize.com it plays well with all json based i18n frameworks...and provides a lot more than traditional systems.

jamuhl
  • 4,352
  • 2
  • 25
  • 31
  • I have accepted this answer as currently there does not seem to be an obvious way to implement i18n with Angular2+Meteor. Furthermore, considering issues not directly related to the technologies at use, such as the process to maintain the translations, seem valid to me and actually came to be important in my case. – Diego A. Jul 06 '17 at 07:54
1

I can recommend the ngx-translate module, we are using it in production in some projects.

  • It is easy to integrate and transactions are stored in the JSON files.
  • Translations are runtime (dynamically inserted through selector keys)
  • Translate invoked through the translation pipe or translation directive

There are also other options summarized in comparison table from angular2localization, that is shown below

angular i18n comparison table

We are also using the native Angular i18n solution, it is integrated into angular CLI build tool and also really easy to use. There is a major drawback of the rebuild for each app localization. It is nicely summarized here.

Also in the angular2translate readme is mentioned this library for usage with Meteor, so there are always multiple options to choose from.

Vojtech
  • 2,756
  • 2
  • 19
  • 29