You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Juan Maya <ma...@gmail.com> on 2007/05/14 01:04:52 UTC

Tapestry 5: Default Locale

Hi all,
Do u know how could i change the default locale for a tapestry 5 app.

I already tried: configuration.add("tapestry.supported-locales", "es") in my
AppModule but it doesn't seem to help.
Thanks for u help

Re: Tapestry 5: Default Locale

Posted by petros <pe...@cypoz.com>.
This is how I did it
http://www.nabble.com/T5---Changing-Locale-tf3376399.html#a10424282

It works when the locale of the browser is changed and the page is
refreshed. However, setting the new locale using ThreadLocale doesn't work
for me either. I was hoping someone was going to reply to my post :)


Blackwings wrote:
> 
> Hum, are we forced to encode in UTF-8?? How can we, also, change the
> default
> locale?
> 
> 2007/5/14, Nick Westgate <ni...@key-planning.co.jp>:
>>
>> > org.apache.tapestry.ioc.internal.util.TapestryException Failure parsing
>> > template context:WEB-INF/Start.html: Invalid byte 2 of 3-byte UTF-8
>> > sequence.
>>
>> This probably means your template is not UTF-8 encoded.
>>
>> Cheers,
>> Nick.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Tapestry-5%3A-Default-Locale-tf3749619.html#a10600696
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5: Default Locale

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Blackwings wrote:
> Hum, are we forced to encode in UTF-8?? How can we, also, change the 
> default
> locale?

I haven't looked into locales yet, sorry.

T5's template parser uses sax. If your document has an XML encoding
declaration like this:

<?xml version="1.0" encoding="ISO-8859-1"?>

... then presumably that encoding will be used. Otherwise I'd guess
it just defaults to UTF-8, since that's the error you're seeing.

Cheers,
Nick.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5: Default Locale

Posted by Blackwings <lo...@gmail.com>.
Hum, are we forced to encode in UTF-8?? How can we, also, change the default
locale?

2007/5/14, Nick Westgate <ni...@key-planning.co.jp>:
>
> > org.apache.tapestry.ioc.internal.util.TapestryException Failure parsing
> > template context:WEB-INF/Start.html: Invalid byte 2 of 3-byte UTF-8
> > sequence.
>
> This probably means your template is not UTF-8 encoded.
>
> Cheers,
> Nick.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry 5: Default Locale

Posted by Nick Westgate <ni...@key-planning.co.jp>.
> org.apache.tapestry.ioc.internal.util.TapestryException Failure parsing
> template context:WEB-INF/Start.html: Invalid byte 2 of 3-byte UTF-8
> sequence.

This probably means your template is not UTF-8 encoded.

Cheers,
Nick.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5: Default Locale

Posted by Blackwings <lo...@gmail.com>.
I tried the same (with fr) at the same place, and I was able to get the 'fr'
labels as default translation, but I was not able to write such of code in
html template :
<a title="Créer un compte" t:type="PageLink" page="Register"> because 'é' is
a 'fr' char and Tapestry return an exception, whatever I put as encoding in
the HTML description itself :

org.apache.tapestry.ioc.internal.util.TapestryException Failure parsing
template context:WEB-INF/Start.html: Invalid byte 2 of 3-byte UTF-8
sequence.


2007/5/14, Juan Maya <ma...@gmail.com>:
>
> Hi all,
> Do u know how could i change the default locale for a tapestry 5 app.
>
> I already tried: configuration.add("tapestry.supported-locales", "es") in
> my
> AppModule but it doesn't seem to help.
> Thanks for u help
>