You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by jimmyblue <lu...@bergshop.com> on 2009/10/03 16:41:57 UTC

t5 localization

hi,

i'm quite new to tapestry. until now, everything just worked fine, but
localization does not. following code does not work for me

public class ChooseLanguage {
	@Inject
	private PersistentLocale persistentLocale;
	
	void onActionFromDe() {
		persistentLocale.set(Locale.GERMAN);
	}
	
	void onActionFromEn() {
		persistentLocale.set(Locale.ENGLISH);
	}
}

the tml file looks like 

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
	<body>
		<t:actionLink t:id="de">German</t:actionLink> | 
		<t:actionLink t:id="en">English</t:actionLink> | 
	</body>
</html>

en and de have been set in the configuration. the english version just works
fine. as soon as I click the german link, I'm redirected to the index page.

tried it with tapestry 5.2.0-SNAPSHOT and 5.1.0.5.

can anyone help?

thanks
jimmyblue
-- 
View this message in context: http://www.nabble.com/t5-localization-tp25729423p25729423.html
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: t5 localization

Posted by jimmyblue <lu...@bergshop.com>.
hi,

looks like, the space before the comma was the problem. without the comma it
works. i thought, i tried it without the comma... anyway, it works now.

thank you

Howard Lewis Ship wrote:
> 
> Perhaps the Tapestry code is broken and the space before the comma is a
> problem.
> 
> On Sat, Oct 3, 2009 at 8:21 AM, jimmyblue <lu...@bergshop.com> wrote:
>>
>> Thanks for the quick response, howard.
>>
>> unfortunately, I already added de in the AppModule
>>
>> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en, de");
>>
>> or do you mean something different by TapestryModule?
>>
>> thanks
>>
>>
>> Howard Lewis Ship wrote:
>>>
>>> If you are working from the Quickstart Archetype, it limits you to
>>> english only.  Update TapestryModule, you'll see where that's
>>> configured, and add "de" to the list.
>>>
>>> On Sat, Oct 3, 2009 at 7:41 AM, jimmyblue <lu...@bergshop.com> wrote:
>>>>
>>>> hi,
>>>>
>>>> i'm quite new to tapestry. until now, everything just worked fine, but
>>>> localization does not. following code does not work for me
>>>>
>>>> public class ChooseLanguage {
>>>>        @Inject
>>>>        private PersistentLocale persistentLocale;
>>>>
>>>>        void onActionFromDe() {
>>>>                persistentLocale.set(Locale.GERMAN);
>>>>        }
>>>>
>>>>        void onActionFromEn() {
>>>>                persistentLocale.set(Locale.ENGLISH);
>>>>        }
>>>> }
>>>>
>>>> the tml file looks like
>>>>
>>>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
>>>>        <body>
>>>>                <t:actionLink t:id="de">German</t:actionLink> |
>>>>                <t:actionLink t:id="en">English</t:actionLink> |
>>>>        </body>
>>>> </html>
>>>>
>>>> en and de have been set in the configuration. the english version just
>>>> works
>>>> fine. as soon as I click the german link, I'm redirected to the index
>>>> page.
>>>>
>>>> tried it with tapestry 5.2.0-SNAPSHOT and 5.1.0.5.
>>>>
>>>> can anyone help?
>>>>
>>>> thanks
>>>> jimmyblue
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/t5-localization-tp25729423p25729423.html
>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>> ---------------------------------------------------------------------
>>> 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/t5-localization-tp25729423p25729799.html
>> 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
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> 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/t5-localization-tp25729423p25729884.html
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: t5 localization

Posted by Howard Lewis Ship <hl...@gmail.com>.
Perhaps the Tapestry code is broken and the space before the comma is a problem.

On Sat, Oct 3, 2009 at 8:21 AM, jimmyblue <lu...@bergshop.com> wrote:
>
> Thanks for the quick response, howard.
>
> unfortunately, I already added de in the AppModule
>
> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en, de");
>
> or do you mean something different by TapestryModule?
>
> thanks
>
>
> Howard Lewis Ship wrote:
>>
>> If you are working from the Quickstart Archetype, it limits you to
>> english only.  Update TapestryModule, you'll see where that's
>> configured, and add "de" to the list.
>>
>> On Sat, Oct 3, 2009 at 7:41 AM, jimmyblue <lu...@bergshop.com> wrote:
>>>
>>> hi,
>>>
>>> i'm quite new to tapestry. until now, everything just worked fine, but
>>> localization does not. following code does not work for me
>>>
>>> public class ChooseLanguage {
>>>        @Inject
>>>        private PersistentLocale persistentLocale;
>>>
>>>        void onActionFromDe() {
>>>                persistentLocale.set(Locale.GERMAN);
>>>        }
>>>
>>>        void onActionFromEn() {
>>>                persistentLocale.set(Locale.ENGLISH);
>>>        }
>>> }
>>>
>>> the tml file looks like
>>>
>>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
>>>        <body>
>>>                <t:actionLink t:id="de">German</t:actionLink> |
>>>                <t:actionLink t:id="en">English</t:actionLink> |
>>>        </body>
>>> </html>
>>>
>>> en and de have been set in the configuration. the english version just
>>> works
>>> fine. as soon as I click the german link, I'm redirected to the index
>>> page.
>>>
>>> tried it with tapestry 5.2.0-SNAPSHOT and 5.1.0.5.
>>>
>>> can anyone help?
>>>
>>> thanks
>>> jimmyblue
>>> --
>>> View this message in context:
>>> http://www.nabble.com/t5-localization-tp25729423p25729423.html
>>> 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
>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> 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/t5-localization-tp25729423p25729799.html
> 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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: t5 localization

Posted by jimmyblue <lu...@bergshop.com>.
Thanks for the quick response, howard.

unfortunately, I already added de in the AppModule

configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en, de");

or do you mean something different by TapestryModule?

thanks


Howard Lewis Ship wrote:
> 
> If you are working from the Quickstart Archetype, it limits you to
> english only.  Update TapestryModule, you'll see where that's
> configured, and add "de" to the list.
> 
> On Sat, Oct 3, 2009 at 7:41 AM, jimmyblue <lu...@bergshop.com> wrote:
>>
>> hi,
>>
>> i'm quite new to tapestry. until now, everything just worked fine, but
>> localization does not. following code does not work for me
>>
>> public class ChooseLanguage {
>>        @Inject
>>        private PersistentLocale persistentLocale;
>>
>>        void onActionFromDe() {
>>                persistentLocale.set(Locale.GERMAN);
>>        }
>>
>>        void onActionFromEn() {
>>                persistentLocale.set(Locale.ENGLISH);
>>        }
>> }
>>
>> the tml file looks like
>>
>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
>>        <body>
>>                <t:actionLink t:id="de">German</t:actionLink> |
>>                <t:actionLink t:id="en">English</t:actionLink> |
>>        </body>
>> </html>
>>
>> en and de have been set in the configuration. the english version just
>> works
>> fine. as soon as I click the german link, I'm redirected to the index
>> page.
>>
>> tried it with tapestry 5.2.0-SNAPSHOT and 5.1.0.5.
>>
>> can anyone help?
>>
>> thanks
>> jimmyblue
>> --
>> View this message in context:
>> http://www.nabble.com/t5-localization-tp25729423p25729423.html
>> 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
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> 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/t5-localization-tp25729423p25729799.html
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: t5 localization

Posted by Howard Lewis Ship <hl...@gmail.com>.
If you are working from the Quickstart Archetype, it limits you to
english only.  Update TapestryModule, you'll see where that's
configured, and add "de" to the list.

On Sat, Oct 3, 2009 at 7:41 AM, jimmyblue <lu...@bergshop.com> wrote:
>
> hi,
>
> i'm quite new to tapestry. until now, everything just worked fine, but
> localization does not. following code does not work for me
>
> public class ChooseLanguage {
>        @Inject
>        private PersistentLocale persistentLocale;
>
>        void onActionFromDe() {
>                persistentLocale.set(Locale.GERMAN);
>        }
>
>        void onActionFromEn() {
>                persistentLocale.set(Locale.ENGLISH);
>        }
> }
>
> the tml file looks like
>
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
>        <body>
>                <t:actionLink t:id="de">German</t:actionLink> |
>                <t:actionLink t:id="en">English</t:actionLink> |
>        </body>
> </html>
>
> en and de have been set in the configuration. the english version just works
> fine. as soon as I click the german link, I'm redirected to the index page.
>
> tried it with tapestry 5.2.0-SNAPSHOT and 5.1.0.5.
>
> can anyone help?
>
> thanks
> jimmyblue
> --
> View this message in context: http://www.nabble.com/t5-localization-tp25729423p25729423.html
> 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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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