O'Reilly logo

Hybrid Mobile Development with Ionic by Gaurav Saini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Internationalization and localization

When we have to build a global application that touches the lives of people from different corners of the world, then we have to think about many aspects such as internationalization and localization. We will be integrating this inside our e-commerce app so that we can add multiple language support.

We will start by installing the ng2-translate npm module:

npm install ng2-translate --save

Next, we will import the modules and methods used inside app.module.ts:

// /src/app/app.module.tsimport { TranslateModule, TranslateLoader, TranslateStaticLoader } from 'ng2-translate/ng2-translate'; export function createTranslateLoader(http: Http) {  return new TranslateStaticLoader(http, './assets/i18n', '.json'); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required