The following are the instructions to do it:
- Create a new TranslateApp using the blank template and navigate inside the folder, as follows:
$ ionic start TranslateApp blank$ cd TranslateApp
- Install ngx-translate/core and ngx-translate/http-loader, as follows:
npm install @ngx-translate/core @ngx-translate/http-loader --save
- Create the en.json file inside the /src/assets/i18n folder and add the following content:
{ "Hello": "Hello", "Good Morning": "Good Morning"}
- Create the de.json file inside the /src/assets/i18n folder and add the following content:
{ "Hello": "Hallo", "Good Morning": "Guten Morgen"}
- Open /src/pages/home/home.html and update it as follows:
<ion-header> <ion-navbar> <ion-title> Ionic Language </ion-title> ...