Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #24553
| From | Tim Slattery <Slattery_T@bls.gov> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Where did my language setting go? |
| Date | 2013-07-01 14:30 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <p7i3t89561o32oj1kaejfdq7ib78e8oolt@4ax.com> (permalink) |
| References | <hbd3t8prm69278clpjolii23cuortojbn7@4ax.com> |
Tim Slattery <Slattery_T@bls.gov> wrote: >The way it works is that a language preference is passed into the >front page. The app used this to create a Locale object specifying the >appropriate language, then uses the Struts method setLocale to save it >in the session object. It then does whatever else it needs to do and >forwards to the JSP page. The page retrieves the Locale and uses it to >determine which language to show. OK, got it figured - kind of. There were two properties files: ces_es.properties with the Spanish stuff, and ces.properties with the English language stuff. The page examined the Locale, and if it specified Spanish, it did: <fmt:setBundle basename="ces_es"/> If the Locale did not specify Spanish it did: <fmt:setBundle basename="ces"/> Apparently, when the browser's preference was set to Spanish, it would tack "_es" onto the basename it searched for in the second instance. Changing the name of the English properties file to ces_en.properties, and changing basename to "ces_en" in the second setBundle did the trick. I guess I don't understand all the rules about searching for a properties bundle. -- Tim Slattery Slattery_T@bls.gov
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Where did my language setting go? Tim Slattery <Slattery_T@bls.gov> - 2013-07-01 12:59 -0400
Re: Where did my language setting go? Tim Slattery <Slattery_T@bls.gov> - 2013-07-01 14:30 -0400
Re: Where did my language setting go? markspace <markspace@nospam.nospam> - 2013-07-01 12:09 -0700
Re: Where did my language setting go? Tim Slattery <Slattery_T@bls.gov> - 2013-07-01 16:13 -0400
Re: Where did my language setting go? markspace <markspace@nospam.nospam> - 2013-07-01 13:37 -0700
csiph-web