Hi Konstantin, (1) I used both because I was not quite sure which of these parameters would help. I only need one parameter.
(2) At the moment I don't know whether the "locale" parameter can be reserved for other purposes of our application. But I think I could reserve it for this purpose. (3) It would be nice if you would have a look at this. Thank you, regards - Volker - -----Original Message----- From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]] Sent: Freitag, 12. April 2002 15:28 To: '[EMAIL PROTECTED]' Subject: RE: How to switch language with i18n at runtime? > From: Volker Schneider [mailto:[EMAIL PROTECTED]] > > 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> Why do you use language and locale together? Locale is enough, it has language[_country[_variant]] format. So, if you need only the language then you use 'locale' and specify two-letter language code: 'en', 'de', etc. > ... > </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? Hm... Have to look at it, but it seems to me that you've found a bug. Are you sure that you need to specify your own locale-attribute? With the default value it should work. I'll take a look at it next week. Konstantin > > 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>