Multilanguaje App

In Google Play you can translate your app using a XML file, Can I have the same “code” and a file with the diferents strings to translate?
Or how can I have the same app in some languajes.

Thanks in advance :smile:

one way of doing it would be this:

  1. Make an object with the different translations of each block of text.
    { "intro": { "en": "welcome to my great app", "es": "bienvenido a mi app" }, "contact": { "en": "write your email here", "es": "ingresa su correo aqui" } }

  2. Stick it in a service so you can get to it from all controllers.

  3. configure a localstorage object with the chosen language and then filter the object so for each value (intro,contact,…) you have the correct translation connected.

  4. Now you can call this object directly in your controller with the right translation.

You can do it with JavaScript only using:

  1. ng-translate (Ionic 1) -


  2. ng2-translate (Ionic 2) -


1 Like

I used JSON files, named translation_<country_code>.json .
country_codes come from localisation.getPreferredLanguage()
then i store the translation object, and i’m able to access it anywhere in my app.