Hi Li:
 
I think the request.getLocale() examine the 'Accept-Language' header coming from the browser. So if the language preference for the browser is set to English(en_us). English locale is always returned - perhaps this explains your problem.
 
hope this helps.
Simon
 
-----Original Message-----
From: Liang Li [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 2:17 PM
To: '[EMAIL PROTECTED]'
Subject: A strange problem about locale.

I have several properties files as :
 
Resources.properties for English (en)
Resources_es.properties for Spanish
Resources_de.properties for Germany.
 
At first everything worked fine, just as I expected: after I changed the locale in "Regional Options" in Control Panel, the following code will return the correct locale.
   
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
    Locale locale = request.getLocale();
 
But after a while (I can't remember what I modified seriously), it doesn't work. Even I set the locale in Regional Options to Spanish, the code always return en_US. And I rebooted several time, no difference
 
Can anybody help  me ? I have Win2000 Professional.
 
Thanks.


============================================================================

This message is intended only for the use of the Addressee(s) and may

contain information that is PRIVILEGED and CONFIDENTIAL. If you are not

the intended recipient, dissemination of this communication is prohibited.

If you have received this communication in error, please erase all copies

of the message and its attachments and notify [EMAIL PROTECTED]

immediately.

============================================================================


Reply via email to