angularinternationalizationngx-translateangular-i18nangular-localize

is runtime language translation possible with angular (@angular/localize)?


I am trying to learn and add Angular Internationalization in a project. I can understand only compile time translation from angular documents (https://angular.io/guide/i18n-overview).

I need some thing like this https://stackblitz.com/github/ngx-translate/example which is third party library 'ngx-translate'.

Can't we achieve the same runtime translation just with angular library without any third party library ?

Please guide me if runtime translation is possible with angular library.


Solution

  • no solutions for runtime with i18n from angular box. Only use ngx-translate. Angular team still only talks about "we will do it in next version", but no success. I work under big project and we use ngx-translate from angular version 4 or 6. u can trust this fird party library. i18n can only build app for some baseHref like:

    https://your.domain/en/...

    https://your.domain/de/...

    When u need to compile a lot of app for work with i18n. ngx-translate - only 1 app, and translations can be splitted by modules where this translations is need.

    My advice - use ngx-translate and when angular team will make runtime language reload - rewrite project part for translation