Angular Ngx-Translate, The Angular Multilanguage Application Library.
If you want to add translation to your application for other languages, this is the library to choose. NGX-Translate is an internationalization library for Angular. It lets you define translations for your content in different languages and switch between them easily. First you need to install the npm module:
npm install @ngx-translate/core --save
Now in our app.module.ts
import {BrowserModule} from '@angular/platform-browser'; import {NgModule} from '@angular/core'; import {TranslateModule} from '@ngx-translate/core'; @NgModule({ imports: [ BrowserModule, TranslateModule.forRoot() ], bootstrap: [ AppComponent ] }) export class AppModule { }
It's use case is as simple as
<div>{{ 'HELLO' | translate:param }}</div>
For more, go here https://github.com/ngx-translate/core