Hi Li:
 
I would type the stuff in chinese window or something. If you have no chinese window, you might have to get some software that could do that in english window.(i have not tried doing chinese thought)
 
Simon
 
-----Original Message-----
From: Liang Li [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 6:14 AM
To: '[EMAIL PROTECTED]'
Subject: RE: A strange problem about locale.

You got it, thanks.
After I moved up es_mx on the language preference list (so the priority is the highest), everything is fine.
 
But there is another problem, I created a properties file Resources_zh.properties, and I typed in some Chinese characters, then saved it (I used WordPad to edit and save the file), but on the page, the Chinese chars are all "???". Even I changed the Encoding, no help.
 
The produced html source header like below:
 
<html lang="zh">
<head>
  <title>Login</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <link rel="stylesheet" href="../externals/styles.css">
  <script src="../externals/lib.js" language="javascript"></script>
</head>
Does the "charset" cause the problem? I remove the charset, no difference.
 
Thanks.
-----Original Message-----
From: Simon Liang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 5:33 PM
To: [EMAIL PROTECTED]
Subject: RE: A strange problem about locale.

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.

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




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

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