You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ivano Luberti <iv...@anche.no> on 2014/11/07 10:28:35 UTC
default locale question
Hi all, a quick question on locales management
I want italian as default locale for my application
I have found this in the configuration section:
> tapestry.supported-locales
>
> A comma-separated list of supported locales. Incoming requests as
> "narrowed" to one of these locales, based on closest match. If no
> match can be found, the first locale in the list is treated as the
> default.
So I have added in AppModule
configuration.add(SymbolConstants.SUPPORTED_LOCALES, "it,en");
but calling
http://localhost:8080/tutorial1/
I get English.
Calling
http://localhost:8080/tutorial1/it
I get Italian
Calling
http://localhost:8080/tutorial1/fr
I get English
Am I missing something?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: default locale question
Posted by Ivano Luberti <lu...@archicoop.it>.
Ok sorry I mssed that..read the page but overlooked it
Il 07/11/2014 11:40, Stephan Windmüller ha scritto:
> On 07.11.2014, Ivano Luberti wrote:
>
>> intl.accept_languages;en-US, en
>> [...]
>> So my initial request is in English and so Tapestry answer?
> That is correct. Please have a look at "Locale Selection" on this page:
>
> http://tapestry.apache.org/localization.html
>
> HTH
> Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: default locale question
Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 07.11.2014, Ivano Luberti wrote:
> intl.accept_languages;en-US, en
> [...]
> So my initial request is in English and so Tapestry answer?
That is correct. Please have a look at "Locale Selection" on this page:
http://tapestry.apache.org/localization.html
HTH
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: default locale question
Posted by Ivano Luberti <lu...@archicoop.it>.
that's easy: Italian
I didn't overlooked the part about missing matches :-)
Il 07/11/2014 11:58, Thiago H de Paula Figueiredo ha scritto:
> On Fri, 07 Nov 2014 08:19:26 -0200, Ivano Luberti
> <lu...@archicoop.it> wrote:
>
>> In firefox:
>>
>> general.useragent.locale = en_US
>> So my initial request is in English and so Tapestry answer?
>
> Yep! Try setting the browser locale to fr and see what locale Tapestry
> picks. :)
>
--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: default locale question
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 07 Nov 2014 08:19:26 -0200, Ivano Luberti <lu...@archicoop.it>
wrote:
> In firefox:
>
> general.useragent.locale = en_US
> So my initial request is in English and so Tapestry answer?
Yep! Try setting the browser locale to fr and see what locale Tapestry
picks. :)
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: default locale question
Posted by Ivano Luberti <lu...@archicoop.it>.
In firefox:
general.useragent.locale = en_US
services.sync.prefs.sync.intl.accept_languages;true
intl.accept_languages;en-US, en
font.language.group;x-western
browser.translation.neverForLanguages;
browser.translation.detectLanguage;false
So my initial request is in English and so Tapestry answer?
Il 07/11/2014 11:02, Thiago H de Paula Figueiredo ha scritto:
> What's your browser configured locales?
>
> On Fri, 07 Nov 2014 07:28:35 -0200, Ivano Luberti
> <iv...@anche.no> wrote:
>
>> Hi all, a quick question on locales management
>> I want italian as default locale for my application
>>
>> I have found this in the configuration section:
>>
>>> tapestry.supported-locales
>>>
>>> A comma-separated list of supported locales. Incoming requests as
>>> "narrowed" to one of these locales, based on closest match. If no
>>> match can be found, the first locale in the list is treated as the
>>> default.
>>
>> So I have added in AppModule
>>
>> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "it,en");
>>
>> but calling
>>
>> http://localhost:8080/tutorial1/
>>
>> I get English.
>>
>> Calling
>>
>> http://localhost:8080/tutorial1/it
>>
>> I get Italian
>>
>> Calling
>>
>> http://localhost:8080/tutorial1/fr
>>
>> I get English
>>
>>
>> Am I missing something?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================
Re: default locale question
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
What's your browser configured locales?
On Fri, 07 Nov 2014 07:28:35 -0200, Ivano Luberti <iv...@anche.no>
wrote:
> Hi all, a quick question on locales management
> I want italian as default locale for my application
>
> I have found this in the configuration section:
>
>> tapestry.supported-locales
>>
>> A comma-separated list of supported locales. Incoming requests as
>> "narrowed" to one of these locales, based on closest match. If no
>> match can be found, the first locale in the list is treated as the
>> default.
>
> So I have added in AppModule
>
> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "it,en");
>
> but calling
>
> http://localhost:8080/tutorial1/
>
> I get English.
>
> Calling
>
> http://localhost:8080/tutorial1/it
>
> I get Italian
>
> Calling
>
> http://localhost:8080/tutorial1/fr
>
> I get English
>
>
> Am I missing something?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org