more options for i18n.setLocale

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

more options for i18n.setLocale

Postby tgs » Thu Aug 25, 2011 12:21 pm

Hi

Is it possible to set the i18n language for example to english (en) and the numberformat to German (DE) like 'en,DE' in the onSolutionOpen method'?
Users of my solution in Germany would like to start the application with the 'en' i18n locale setting, but don't like the automatic setting of the numberformat (217.436,17 instead of 217,436.17). It would be also helpful to be able to set different local keyboard settings.
Could it be possible to have the opportunity to set the language locale i.e. to english (en) and the numberformat and keyboard settings to the locale settings of the computer of the user (i.e. DE)?

Regards
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: more options for i18n.setLocale

Postby jcompagner » Thu Aug 25, 2011 5:29 pm

no thats not easy possible in servoy, because if you set the locale to 'en' then that is used by default throughout the system including the Date/Number format classes
Why can't you use a 'de' locale?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: more options for i18n.setLocale

Postby tgs » Thu Aug 25, 2011 5:55 pm

Because the default language setting of the solution should be english (en). Users from Germany (de) logging in with i18n.setLocale('en,EN') and load the english i18n keys. Also users from Italy, Scandinavia and so on if they won't like to localize the software. This guys are asking me why don't they get the number/date format of the country settings of their computer?
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: more options for i18n.setLocale

Postby jcompagner » Thu Aug 25, 2011 6:07 pm

and that is because you are overwriting their systems Locale..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: more options for i18n.setLocale

Postby tgs » Thu Aug 25, 2011 6:48 pm

Ok, but the users would open the solution with the english i18n keys and have their system locale for number/date.
As I understand, is the only way to do this by setting all i18n keys default to i.e. english. But how should I manage this if other users would like to localize the i18n keys to their homelanguage? And do I have to remove all i18n key values in i.e. german? The i18n locale should only set the solution language and not the format of i18n locale!
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: more options for i18n.setLocale

Postby tgs » Fri Aug 26, 2011 10:52 am

Hi Johan,

I will show you an example of the language and format settings on my Mac OSX. All the labels and items in english, but the formats are in german. That is what I would like to have for the i18n.locale settings in Servoy. BTW, I have the same on Win 7 pro. Installed Win OS in english language and format and keyboard settings in german.
Attachments
set2.png
set2.png (78.79 KiB) Viewed 10661 times
set1.png
set1.png (65.4 KiB) Viewed 10661 times
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: more options for i18n.setLocale

Postby jcompagner » Wed Aug 31, 2011 2:17 pm

thats currently just not possible, the locale of a client is now used for everything
What you want is that you be able to set a locale special for the language
that we only use for getting the text.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: more options for i18n.setLocale

Postby tgs » Wed Aug 31, 2011 2:41 pm

That's right! What do you think, could this be a feature for the future? Perhaps in 6.1? :D
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: more options for i18n.setLocale

Postby jcompagner » Wed Aug 31, 2011 2:46 pm

make a case for that.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: more options for i18n.setLocale

Postby tgs » Wed Nov 30, 2011 9:41 pm

Hi Johan,

I have read about some new features in Java 7 especially the changes for the locale. New is a different setting of 'Display' and 'Format'.
Code: Select all
Locale.setDefault(Locale.Category.DISPLAY, Locale.GERMAN);
Locale.setDefault(Locale.Category.FORMAT, Locale.UK);


Makes this possible for Servoy to implement the i18n settings as discribed in my posts above?

Regards
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: more options for i18n.setLocale

Postby jcompagner » Thu Dec 01, 2011 2:09 pm

yes that looks like it maps on your request.
Problem for this is that to fully support this throughout our code in smart and webclient we need to compile against java7 and that won't happen anytime soon.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests