Page 1 of 2

Please add globalization options to the app builder

Posted: Fri Aug 02, 2013 1:17 pm
by Tom6106181

To make it simple to build multi-language apps.
http://docs.phonegap.com/en/2.2.0/cor...

Should be an "app-setting" for this; Multi-language? yes/no, language resource folder for storage of language files. An en_US should be there from the start, and developer only would need to make a copy to other languages when app complete to translate it.

Please look into the possibility to implement this/or similar, as I am currently building an app that need multilanguage support.

Thanks!


Please add globalization options to the app builder

Posted: Fri Aug 02, 2013 1:29 pm
by Maryna Brodina

Hi, not sure if it's planned, but I'll forward your request to Max Katz, he'll get back to this post and update.


Please add globalization options to the app builder

Posted: Fri Aug 02, 2013 1:50 pm
by Tom6106181

Okei :)

I propose (as I said above) an implementation in app-settings:

  • Globalization Yes/No

    if yes, run on device ready = globalization check on device, and load appropriate language resource from /locale folder. Default en_us_locale with a couple strings inside, and a simple setting on components to use and define locale string.

    Would make the app builder awesomer :)


Please add globalization options to the app builder

Posted: Fri Aug 02, 2013 5:07 pm
by maxkatz

As this is part of PhoneGap's API, and PhoneGap is included in your app, you can use it today. Did you have something else in mind?


Please add globalization options to the app builder

Posted: Sat Aug 03, 2013 11:50 am
by Tom6106181

Hi Max!
Sure, I get that, but my suggestion is to implement this in the App builder = app_settings (eg: No need for custom implementation).

This would make the app builder even more usable for many app developers :)

As for me, I am not sure how to do this custom in the app builder, so I am kinda stuck. Tutorial please, or even better, listen to your customer and take a look into implementing such a setting in the app builder :)

Thanks!
-Tom


Please add globalization options to the app builder

Posted: Mon Aug 05, 2013 4:33 pm
by maxkatz

What settings would you like to see? For example, from PhoneGap docs, if you want to check what language the browser is set to, you would run this code:

navigator.globalization.getPreferredLanguage(
function (language) {alert('language: ' + language.value + '\n');},
function () {alert('Error getting language\n');}
);


Please add globalization options to the app builder

Posted: Tue Aug 06, 2013 5:02 pm
by Ole Henrik Oftedal

Yes. This will reallly be a gigant Leap for Appery. Because the world is becoming more and more globalized. And serious companies needs to developer for several different coutries and languages. In i.e. Delphi xe4 you have a TLang component. Here you can add other languages when needed. The component iitself can scan for strings in the project and then the developer can translate. You can change languages at run time but being able to do it before build should be god enough for the majority I think.


Please add globalization options to the app builder

Posted: Wed Aug 07, 2013 12:58 pm
by Kateryna Grynko

Hi,

You can use in your app the text enclosed in curly braces and mark all items with a special class, for example _:
code{label caption}/code
Then when start or at any other time, your application can query such items and change their text to the desired language. This may work in such a way that for English, for example, the substitution is in removing the braces. For other languages​​, it will be to find matching pairs of text.

The important point here is to think in advance about the numerals. It is the most difficult part in the internationalization. The implementation of numerals is a topic for another discussion.


Please add globalization options to the app builder

Posted: Sat Jan 11, 2014 11:40 am
by Tom6106181

Hi. Do you have an example on how to implement this to my app (on app start/load)?
english (language 1), norwegian (language 2).

If device language example, German = Use English language (default)


Please add globalization options to the app builder

Posted: Sun Jan 12, 2014 1:54 am
by maxkatz

We don't have an example, but there is a jQuery plug-in that might help you with localization: http://stackoverflow.com/questions/90...

We are planning to add some builder features to help with this.