Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED.sjs-cc-wifi-1-1-lc-int.sjsu.edu!not-for-mail From: markspace Newsgroups: comp.lang.java.programmer Subject: Re: Where did my language setting go? Date: Mon, 01 Jul 2013 13:37:20 -0700 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 1 Jul 2013 20:31:51 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="sjs-cc-wifi-1-1-lc-int.sjsu.edu:130.65.11.68"; logging-data="1953"; mail-complaints-to="abuse@eternal-september.org"; posting-account="markspace" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:24556 On 7/1/2013 1:13 PM, Tim Slattery wrote: > markspace wrote: > > >> I'm kind of confused why it would do this. I don't really know about >> Struts or even JEE every much, so I'm probably missing something, but >> getLocale() on HttpServletRequest should return the locale requested by >> the browser (client). Then you should just be able to do this: >> >> ResourceBundle labels = ResourceBundle.getBundle("ces", locale); > > You're probably right. I should check out just doing basename="ces"/> and see if would get the language suffix from the > Locale that's been set. I don't think it's very likely that this app > will get any more languages, but even so it would clean up the code a > lot. > I did a quick web search for "struts fmt setbundle" and found this example.
So a "setLocale" might be required as well.