[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Formatting of numbers (long) depending on the language  XML
Forum Index -> Development
Author Message
kessler

Power User

Joined: 22/01/2008 15:14:19
Messages: 47
Offline

Hi Captain,

I have a problem with formatted numbers. We want to show the numeric values with a separator for the thousands-blocks so I set the format=long, the formatmask is not set. Depending on the locale of the loggedin user they should be shown different:

DE: 1.234.567.890
EN: 1,234,567,890
FR: 1 234 567 890

This works fine for German and English, but in French the number is also shown with '.' as thousands-separator instead of ' '
What could be the reason there? And how can it be fixed?

Greetings from Ettlingen
Antje
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi Antje,

yes, you are right our localization for FR is not correct. We corrected this now...

How are country-localizations kept? per country there is a file:
Code:
 eclntjsfserver-xxxx.jar:
 
 eclntjsfserver
     risc
         i18n
             ...
             country_FR.xml
 


In this file there is either direct or indirect (by link to a general file) the information:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <country
     decimalSeparator=","
     thousandsSeparator=" "
     dateSeparator="."
     timeSeparator=":"
     ymdSequence="dmy"
 />
 


You can override the default localization by implementing interface:

Code:
 /**
  * Interface that can be implemented in order to update the client literals
  * that are sent to the rendering client. Registration of interface is done
  * in system.xml (section "clienti18n").
  */
 public interface IClientI18NCountriesUpdate
 {
     public void updateCountryInfo(Map<String, CountryInfo> data);
 }
 


So, you may update the FR info already in your existing release.

Thanks for your message on FR +
Greetings to Ettlingen! ;-)

Björn

Björn Müller, CaptainCasa GmbH
kessler

Power User

Joined: 22/01/2008 15:14:19
Messages: 47
Offline

Thanks for the quick info! Great that it will be in the next release (when is it planned?).

I now tried a simple test, just changed the thousandsSeparator=" " in file country_CCTYPE1.xml in the tomcat-folder: tomcat\webapps\idm-operator\eclnt\risc\i18n
This does not have any effect
kessler

Power User

Joined: 22/01/2008 15:14:19
Messages: 47
Offline

ok, it is working, when I put the changed country_CCTYPE1.xml to WEB-INF/classes/eclnt/...
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

Hi Antje,

my explanation on the files was just to explain how things work and where to look for the details.

If you update: only through the interface "IClientI18NCountriesUpdate"! (!!) (better: !!!!!!!!!!!!!!!)

Now, in your scenario, the selection of the right file is in the hands of the classloader... So it might work because the e.g. Tomcat classloader prefers .class implementations in front of .jar-contained content.

But, as soon as you package into .jar files on your own, then it's some kind or random decision---

Kind regards! Björn

...and: the next update is published next Monday

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team