>From http://developer.java.sun.com/developer/technicalArticles/Intl/ResourceBundles/

[-- Begin quote --]
The getBundle method provides a graceful degradation algorithm that attempts to find 
the nearest matched bundle in cases where the specified bundle can't be found or 
doesn't exist. In the following search, each element of the search name is separated 
with an '_' (UNDERSCORE) character. The algorithm searches for bundle names in the 
following order: 

<baseclass>+<specific language>+
  <specific country>+<specific variant>
<baseclass>+<specific language>+
  <specific country>
<baseclass>+<specific language>
<baseclass>+<default language>+
  <default country>+<default variant>
<baseclass>+<default language>+
  <default country>
<baseclass>+<default language>
<baseclass>

[-- End quote --]

If a key is not found in a specific resource bundle, the next one higher up in the 
hierarchy is searched. The default behavior of ResourceBundle does what you need.

-= J

> -----Original Message-----
> From: scarter [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 27, 2003 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: STRUTS INTERNATIONALIZATION
> 
> 
> Is there a way in struts to maintain a default application resources
> file that can be referred to in the event that a requested resource is
> not found in another resource file.  For example, it would be 
> nice if I
> could only define specific resources in each locale specific resource
> file, instead of all of them, which consumes much more memory and more
> importantly, makes the application difficult to maintain.  
> The full set
> of default application resources could be defined in a default
> application resource file that would be called if the resource is not
> present in a locale specific one.  This is especially important where
> two locales are defined, say the US and UK, where very few resource
> differences exist.  If there are only a handful of resource 
> differences
> between these locales, I would not want to have to create an entirely
> new resource file for each one, since there would be quite a few
> redundancies.
> 
> I am aware that we can define separate resource bundles and associate
> each one with a bundle name.  However the problem with this 
> approach is
> that I have to modify all of my struts tags to use statically defined
> bundle names.  Does anyone know of another way I can resolve this
> problem?  
> 
> Thanks,
> 
> Scott Carter
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to