commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Phillips <randy_phillips...@yahoo.ca>
Subject Re: [CONFIGURATION] questions
Date Mon, 03 Jan 2005 17:38:42 GMT
Hi Emmanuel,
Yes I have looked at this.
The conflict, as I see it, is that within a particular
Configuration object, built on a number of properties
files, makes no distinction between the individual
properties file and the name/value pairs within them.

Using i18n, the individual properties files represent
different Locales while the names within remain the
same and their values represent the Locale specific
"translation".

If I understand how the Configuration object works,
the  "conf.xml" file contains a list of properties
files but only the name/value pairs of the "top-most"
properties are used to resolve a "getString(<name>)". 

In an i18n scenario this cannot work as individual
properties (Locale specific) must be addressed.

Thanks for your interest,

Randy Phillips

 --- Emmanuel Bourg <ebourg@apache.org> wrote: 
> Did you try to solve this issue with the standard
> PropertyResourceBundle ?
> 
>
http://java.sun.com/j2se/1.5/docs/api/java/util/PropertyResourceBundle.html
> 
> Emmanuel Bourg
> 
> 
> Randy Phillips wrote:
> 
> > Sure...
> > 
> > The text of page (or set of pages) is supported
> via a
> > properties file. Each language supported is
> > represented  via it's own properties file.
> > As an example... 
> > I have two pages named page1 and page2. I support
> 3
> > languages, Canadian English, Canadian French and
> > Spanish.
> > 
> > I support these pages and their respective
> languages
> > using three properites files:
> > 
> > page1_en_CA.properties,
> > page1_fr_CA.properties and
> > page1_es_ES.properties as well as 
> > page2_en_CA.properties,
> > page2_fr_CA.properties and
> > page2_es_ES.properties.
> > 
> > Within these files the "Welcome" title would look
> like
> > this:
> > 
> > In page1_en_CA.properties
> > welcome.title=Welcome to the Application!
> > 
> > In page1_fr_CA.properties
> > welcome.title=Bienvenue ŕ l'application!
> > 
> > In page1_es_ES.properties
> > welcome.title=Recepción al uso!
> > 
> > So based on the users selected Locale (i.e.
> English,
> > French or Spanish) the appropriate properties file
> is
> > referenced and the value of "welcome.title" is
> > displayed in the appropriate language.
> > 
> > Although I haven't delved deeply into the issue,
> at
> > this point the only  alternative I see is to
> create
> > multiple Configuration objects, each on
> representing a
> > particular Locale.
> > 
> > However, I'm not convinced this is the best
> solution. 
> > 
> > Again, I appreciate any insight you can provide to
> my
> > dilema.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
>  

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message