Haim
Posts: 0
Joined: Wed Sep 05, 2012 9:15 am

Foreign language support using Tiggzi

How does one do the following (eventual support on Android + iOS):

  1. Detect the language of the phone

  2. Provide for text/menu/etc in other supported languages

    Where can I provide alternative text values for the few text labels and boxes I have on my screens?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Foreign language support using Tiggzi

Hello!

1) You can try to use navigator.language to get this information

language = navigator.language.split("-");
language_root = (language[0]);

2) It should be coded (you can change values with JS)

Try using Settings service

Haim
Posts: 0
Joined: Wed Sep 05, 2012 9:15 am

Foreign language support using Tiggzi

Thanks - but my questions was really related to the actual strings and where to declare the foreign language equivalent. If I remember correctly, there are resources that are declared in an Android build.

For example, I might have a directory in the Android build called "values" which sits until "res" - and these values include XML files like "strings.xml" which has all my strings declared.

If I want to support Spanish (language code is "es") - then I would create a parallel "values" directory called "values-es" which also sits in "res" and would contain equivalent Spanish translated strings.

Am I going down an old path? I know that a previous version of our app (custom build) used this approach - perhaps there's a better way?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Foreign language support using Tiggzi

It seems that it's possible to create such functionality only after exporting App to Eclipce and xCode where it should be coded separately for Android and iPhone.

Haim
Posts: 0
Joined: Wed Sep 05, 2012 9:15 am

Foreign language support using Tiggzi

By the way, thanks for the above - it wasn't my original question, but it does answer another question on how to query the phone's language setting. Thanks.

Return to “Issues”