language and style issues after reinstall java and servoy

Questions and answers for all installation-related topics for Servoy products

language and style issues after reinstall java and servoy

Postby jdbruijn » Mon Sep 02, 2013 12:39 pm

Recently i've been forced to reinstall java and servoy on my development machine. And now i'm having a couple of issues:
1. Servoy does not recognize my region settings anymore, both in developer and when I run a smartclient from my test server.
2. Smart client shows all my text in bold

I've installed the following versions:
Windows 7 64bit
java 7.25 - 32bit (was 6.24, 64bit - very old I know)
Servoy 6.1.6 (same version as before my environment crashed)
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: language and style issues after reinstall java and servo

Postby jcompagner » Tue Sep 03, 2013 11:33 am

region settings are just java settings, that are taken from the system. Servoy does only read them by default.
Only if you set them hard in the (client or server) preferences or through scripting we do set the locale and timezone defaults.

bold text is a known problem of java 7. there are numerous bug reports for that already at oracle/sun including one of my own where i exactly say where the problem is.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: language and style issues after reinstall java and servo

Postby jdbruijn » Tue Sep 03, 2013 11:50 am

The system settings have not changed. I do have an english windows version, but region settings are set to dutch:
Formats: Dutch
Location: Netherlands
Keyboard: Dutch(Netherlands) - US
Language non-unicode programs: Dutch

I also notice the problem with the language in the developer when I wnat to edit i18n values: it is default set to english.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: language and style issues after reinstall java and servo

Postby jcompagner » Tue Sep 03, 2013 12:48 pm

that something java7 does it seems..

if i have a simple application that just prints out 2 defaults:

System.err.println(Locale.getDefault());
System.err.println(TimeZone.getDefault());

then in java6 i get:

nl_NL
"Europe/Berlin"

and in java7:

en_GB
"Europe/Berlin"

i see in eclipse/servoy developer: (Help -> About -> Installation Details-> Configuration)

osgi.nl=en_GB
user.country=GB
user.country.format=NL
user.language=en
user.language.format=nl
user.timezone=Europe/Berlin

so it seems that the locale now reflects the languages of your operation system, but the formats are set to NL ....

http://bugs.sun.com/bugdatabase/view_bu ... id=7073906

it seems that in java7 we need to use the new stuff Category stuff

http://stackoverflow.com/questions/7107 ... ult-locale

But that is a bit of a problem because we don't have a compile dependency against java7 (we compile against java6)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: language and style issues after reinstall java and servo

Postby jdbruijn » Fri Oct 04, 2013 2:17 pm

I've managed to fix this be setting java runtime variables to the correct language.
Open Java Control Panel -> Java tab -> View.
Add the Java Runtime Environment Settings i've added the following runtime parameters:
-Duser.language=nl -Duser.country=NL
After restarting my client, it uses the correct language and the text is no longer in the BOLD format.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: language and style issues after reinstall java and servo

Postby Harjo » Fri Oct 04, 2013 4:05 pm

For the time being (not compiling against Java 7) Servoy could use this:

Note that you can revert to the old behavior by setting the sun.locale.formatasdefault system property to true.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: language and style issues after reinstall java and servo

Postby jcompagner » Sat Oct 05, 2013 9:45 am

make a case for this, maybe we can have some fallbacks, problem is that its easy to fix i guess from our methods.
But much harder if we really need to fix it in the core for the general i18n messages (if thats needed)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests