Hi Nick,
After I changed:
from:
configuration.add("tapestry.supported-locales", "zh,en");
to:
configuration.add("tapestry.supported-locales", "en,zh");
from:
persistentLocaleService.set(Locale.ENGLISH);
to:
persistentLocaleService.set(new Locale("en"));
it works now, I don't know what's the difference, maybe they are just the
same. but since it's working, I'll just leave it as it is now:)
A.C.
Nick Westgate wrote:
>
> I'm not sure without seeing your code.
> What is top of the list in your browser's preferred languages?
>
> (In Firefox, Tools->Options->Advanced->Languages->Choose.)
>
> Cheers,
> Nick.
>
>
> ----- Original Message -----
> From: "Angelo Chen" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, 29 August 2007 10:35 p.m.
> Subject: Re: T5: Chinese localization
>
>
>
> Hi Nick,
>
> You are right, the properties file has to be escaped, it works now,
> thanks.
> however I have observed some other problem:
>
> It always uses the app_zh.properties, even I do:
>
> persistentLocaleService.set(Locale.ENGLISH);
>
> the only time it will use the app.properties content is, when I delete the
> app_zh.properties file, any idea why it's like that?
>
> Thanks,
>
> A.C.
>
>
> Nick Westgate wrote:
>>
>> The question marks suggest the problem is on the Java (server) side.
>>
>> How are you encoding your Chinese characters in the properties files?
>> You must escape them, which is easiest using an Eclipse plugin like:
>> http://propedit.sourceforge.jp/index_en.html
>>
>> Cheers,
>> Nick.
>>
>>
>> Angelo Chen wrote:
>>> Hi,
>>>
>>> I'm trying out Chinese localization, I have following:
>>>
>>> configuration.add("tapestry.supported-locales", "en,zh");
>>>
>>> two files app.properties, app_zh.properites, both file has one entry:
>>>
>>> layout.home=Home
>>> layout.home=主页
>>>
>>> everything works in English, but when I switch:
>>>
>>> persistentLocaleService.set(Locale.SIMPLIFIED_CHINESE);
>>>
>>> what displays are questions marks. if I put English in the app_zh, it
>>> can
>>> display. the page is 'utf-8' and it displays utf-8 chinese correctly,
>>> just
>>> those strings coming out from app_zh, what I'm missing here?
>>>
>>> Thanks,
>>>
>>> A.C.
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Chinese-localization-tf4347158.html#a12387250
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/T5%3A-Chinese-localization-tf4347158.html#a12398083
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]