This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 1.3 Localization - Fallback locale if key is not found. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.3 Localization - Fallback locale if key is not found." Watch "Struts 1.3 Localization - Fallback locale if key is not found." New topic
Author

Struts 1.3 Localization - Fallback locale if key is not found.

Sundar Subramaniam
Greenhorn

Joined: May 19, 2014
Posts: 1
If I do not have a particular key in the properties file for a specific locale, say German, which I do in English, is it possible to have that particular piece of text still display the English value from the corresponding properties file or any other fallback value rather than show an error message? Currently I'm using the null=false property in the struts config and when it finds a missing key it simply shows an error in that place. I would like it to pull the value from the English locale instead if the German properties file doesn't have that key.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8834
    
    7

About the ResourceBundle Class


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts 1.3 Localization - Fallback locale if key is not found.
 
Similar Threads
I18n problem
Default Language Properties file
internationalization in iText
locale attribute in html:errors is not working
Multilingual web application in struts