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:48:57 UTC

i18n Gets Even Weirder: It is Reading from the File, but Only Certain Languages and a Mystery Value

Here are the really odd facts.  1) I know the app is finding my 
Resources_zh.properties file when the browser is set for Chinese, because 
if I use English values for the keys and change their value in 
Resources_zh.properties but no where else, the values come up in the 
browsers.  2) However, if I change the value to unicode for Chinese, the 
old values show up, and those values are not in any file at all at that 
time.  They have to be coming from cache.  3) then, if I change the unicode 
back to different English than it ever was, that changes and shows 
up.  Does anyone have any idea on any of this?

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>