Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Tim Slattery Newsgroups: comp.lang.java.programmer Subject: Struts I18N Date: Thu, 21 Mar 2013 13:01:49 -0400 Organization: A noiseless patient Spider Lines: 24 Message-ID: <6pemk817nguv4g01eghg78f2vgfusfb2ko@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx05.eternal-september.org; posting-host="70ffcd12c5dd21205ce42b46a9cea21b"; logging-data="4525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PZnocMgJayrWiDVQETW8KlQzvBpCM6JI=" User-Agent: ForteAgent/7.00.32.1200 Cancel-Lock: sha1:dy8rQQDKJ4rB80tFSWuNX6fGs4A= Xref: csiph.com comp.lang.java.programmer:23035 Does anybody know just when and how often Struts 1.3 sets the "Default locale"? We have a web system that kinda-sorta uses Struts internationalization. The user chooses a language at the beginning (English or Spanish). A Locale object is created using that choice, and saved using the setLocale method of the Action object. Later Actions will retrieve that Locale object and use the language designation to find the right things. Among those things are rows in the database. In the table that's showing the problem, there are rows identified with "es" or "en", the languages that we support. But we have a report that one user is getting an error message because the program is looking for a "zh" (Chinese) row. My theory is that although either "en" or "es" is set at the beginning of the app, each request can reset that according to the user's language preference, though I'm not sure how that's set. If that's right, then the user with the problem has his browser set for Chinese, and our setting disappears with his second request. Is this right? -- Tim Slattery Slattery_T@bls.gov