You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by micael <ca...@harbornet.com> on 2002/07/01 06:52:21 UTC

Re: Weird i18n Results -- i18n Experts Out There?

I see what you are saying, Craig, but the message keys are all in the same 
file.  Yet, only some are used.  None with the unicode in this case, 
although there is no trouble with Japanese.

At 05:00 PM 6/30/2002 -0700, you wrote:
>Thanks for the note.  But, I don't how that could cause this problem, or 
>how that could lead to a different file being read by the same 
>page.  Wouldn't the page access the same file in each case according to 
>this explanation?
>
>Let me ask a question to get some clarification.  I have all my message 
>keys in a file called Resources_zh.properties for Chinese.  Some of them 
>are being read.  Some are not.  Why would it change the file it reads for 
>some and not others?  The name of the file does not change.  I have 
>checked and I know that the browser is set at zh.
>
>The only keys it actually is reading are either graphic keys, which are 
>not unicode, or English keys, which are not unicode either.  It fails to 
>read only the unicode.  I do not have that problem with the 
>Japanese.  Could it be that the person that did the unicode was mistaken 
>about the proper values?  Does that make sense?  Doesn't make sense to me 
>offhand.
>
>Thanks again.  Mystery unabated.  I don't understand what to do with the 
>answer you gave.  It is accessing the proper file, but not for 
>everything.  Odd.
>
>At 03:13 PM 6/30/2002 -0700, you wrote:
>
>
>>On Sun, 30 Jun 2002, micael wrote:
>>
>> > Date: Sun, 30 Jun 2002 14:02:47 -0700
>> > From: micael <ca...@harbornet.com>
>> > Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
>> > To: Struts Users Mailing List <st...@jakarta.apache.org>
>> > Subject: Re: Weird i18n Results -- i18n Experts Out There?
>> >
>> > I recently added the Japanese to the entire site with no issues.  I
>> > presently have English, Spanish, Italian, German, Portugese, French and
>> > Japanese working fine.  There is not a file on the site that has the
>> > results that I am getting, so it must be cached.  But, if it is cached,
>> > then how in the heck is it reading changes to the messages keys with
>> > English.  It is like it is reading some keys from this file and some other
>> > keys from a cache or another file.  Is that possible?
>> >
>>
>>Struts follows the standard rules for the java.util.ResourceBundle class
>>to figure out which file to get messages from.  For example, if your
>>user's language preference (configured in the browser) is the zh_CN
>>locale, Struts will check for the existence of the message key in each of
>>these locales in sequence:
>>
>>* zh_CN
>>
>>* zh
>>
>>* The default Locale for the JVM
>>
>>Thus, it is quite possible for the messages on a particular page to end up
>>coming from different files.  The important thing is to match up you
>>filenames with the way that the browser is specifying them.
>>
>> > Micael
>>
>>Craig
>>
>>
>> >
>> > At 10:38 PM 6/30/2002 +0200, you wrote:
>> > >Your browser-cache is cleaned too?
>> > >
>> > >
>> > >Durk
>> > >
>> > > > I am building an i18n site.  I had a page with buttons that were in
>> > > > Chinese, and have now change about half the text to Chinese.  That 
>> text
>> > > >  still comes up in English.  I thought somehow the application was not
>> > > > accessing the xxx_zh.properties file, so I changed a remaining English
>> > > > key  value.  And, that changed in an accessing browser, so I know 
>> it is
>> > > >  accessing that file.  Yet. it is coming up with English that is not
>> > > > even on  the site anymore.  It must be cached somewhere.  However, I
>> > > > shutdown  Tomcat, cleared the cache in TOMCAT_HOME/tomcat/work/ and
>> > > > still get the  same results.  I have no idea what is going on.  I 
>> don't
>> > > > even know what the  question is.  I seemingly cannot be a cache
>> > > > problem, because changes to the  file are shown.  When I change a key
>> > > > that has Chinese, that is not  reflected on the browser.  When I 
>> change
>> > > > a key that has English, that is  reflected.  What in the Sam Hell is
>> > > > going on?
>> > > >
>> > > > Micael
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > To unsubscribe, e-mail:
>> > > > <ma...@jakarta.apache.org> For additional
>> > > > commands, e-mail: <ma...@jakarta.apache.org>
>> > >
>> > >
>> > >
>> > >
>> > >--
>> > >To unsubscribe, 
>> e-mail:   <ma...@jakarta.apache.org>
>> > >For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>> >
>> >
>> >
>> > --
>> > To unsubscribe, 
>> e-mail:   <ma...@jakarta.apache.org>
>> > For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>> >
>> >
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>