Is there any other alternate library for Angular 2 Translation other than ng2-translate ?
Asked
Active
Viewed 1,234 times
0
-
See if this helps. https://www.npmjs.com/package/angular2-translator – Sanket Jun 24 '16 at 06:38
3 Answers
2
yes i found angular2-translate, nativescript-ng2-translate, angular2-translator. and if you want make your owen translation class in angular 2 than look at this stackoverflow question.

Community
- 1
- 1

Vinay Pandya
- 3,020
- 2
- 26
- 42
0
What is wrong with the already implemented i18n-Internationalization in Angular 2? It is for template text translation:
https://angular.io/docs/ts/latest/cookbook/i18n.html
Instead of using ng2-translate you can use the i18n directive. See the link for full documentation about i18n.

Htaccess24
- 59
- 5
-
ASAIK, angular 2 i18n is ok for managing the static contents of the application. What about the translation of dynamic/interpolated contents? – Ste83 Apr 20 '17 at 10:48
-
I think for dynamic contents you should serve it directly from the database depending from the users language setting. Automatic translation of dynamic content can't be good. – Htaccess24 Apr 20 '17 at 10:52
-
Sorry, with dynamic I meant JS generated text. Eg, error messages that are not in the markup but which are injected into the page through interpolation. Where should I take the err-messages translations from? (ng2-i18n do not include anything in the translation files that is not in the markup, and it has no API to set/get translations programatically (AFAIK) – Ste83 Apr 20 '17 at 14:33
0
You can check the ngstack/translate library that works for Angular and Ionic apps. Also provides support for page title translations and custom pipes.

Denys Vuika
- 621
- 1
- 12
- 10