cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: How to switch language with i18n at runtime? - temporary solu tion
Date Fri, 12 Apr 2002 13:37:58 GMT
> From: Volker Schneider [mailto:volker.schneider@danet.de] 

> Hi Konstantin,
> 
> I tried a request parameter called "locale" (as you said before):
> 
>     .../Cocoon/test?locale=en
> and .../Cocoon/test?locale=de
> 
> works fine, but the <map:parameter name="locale-attribute" 
> ...>-section can be left out (it has no effect). It is not 
> possible for me to use an other name for the request 
> parameter (maybe it's a bug?), but that'll do at the moment.

Yes, if you don't specify your attribute then the default 'locale' attribute
name will be used. I'm not sure where is the bug. I think that it's i18n
transformer's problem. This will be solved when I add 'locale' parameter
support to it.

Konstantin

> 
> Thank you, best regards,
> - Volker -
> 
> -----Original Message-----
> From: Volker Schneider [mailto:volker.schneider@danet.de]
> Sent: Freitag, 12. April 2002 15:16
> To: cocoon-users@xml.apache.org
> Subject: Re: How to switch language with i18n at runtime?
> 
> 
> Hi Konstantin,
> 
> I'm sorry but if I tried your solution, I got the german 
> translation in every case. I did this:
> 
> <map:actions>
> ...
> <map:action logger="sitemap.action.locale" name="locale" 
> src="org.apache.cocoon.acting.LocaleAction">
>   <map:parameter name="language-attribute" value="x"/>
>   <map:parameter name="locale-attribute" value="y"/> 
> </map:action> ... </map:actions>
> 
> and:
> 
> <map:match pattern=test">
>   <map:act type="locale">
>     <map:generate src="prototyp/first.xml"/>
>     <map:transform type="i18n"/>
>     <map:serialize type="xml"/>
>   </map:act>
> </map:match>
> 
> or this:
> 
> <map:match pattern=test">
>   <map:act type="locale">
>   </map:act>
> 
>   <map:generate src="prototyp/first.xml"/>
>   <map:transform type="i18n"/>
>   <map:serialize type="xml"/>
> </map:match>
> 
> My request .../Cocoon/test?x=en&y=en
> 
> always returns the german translation. What is wrong?
> 
> Regards,
> - Volker -
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered 
> in the FAQ before posting. 
<http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the FAQ
before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message