commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [CONFIGURATION] questions
Date Sun, 02 Jan 2005 21:42:29 GMT
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


Mime
View raw message