How it works...

In this example, we are using ngx-translate for internationalization. It's a fairly simple process. The basic idea is that we have a JSON file for each of the languages that we want to support in our app. For example, en.json for English and de.json for German. In the JSON file, we have keys and values. Values are translated texted that we want to show in our app, and keys are something that we are going to put inside the app.

It's also important that we need to have the same keys for multiple languages and different values based on the translation. Take a look at the following two JSON files:

en.json:

{  "Hello": "Hello",  "Good Morning": "Good Morning"}

de.json:

{  "Hello": "Hallo",  "Good Morning": "Guten Morgen"}

Both files ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.