Try <map:serialize type="html"/> . The i18n transformer is very particular
about the output method.
Peter
Peter Binkley
Digital Initiatives Technology Librarian
Information Technology Services
4-30 Cameron Library
University of Alberta Libraries
Edmonton, Alberta
Canada T6G 2J8
Phone: (780) 492-3743
Fax: (780) 492-9243
e-mail: [EMAIL PROTECTED]
________________________________
From: Hugo Marcelino [mailto:[EMAIL PROTECTED]
Sent: Monday, December 19, 2005 03:07 PM
To: [email protected]; [EMAIL PROTECTED]
Subject: I18n problem - need some help : urgent
Hi users !
My name is Hugo Marcelino and i'm having problems in using i18n.
I'm getting crazy with a problem that i'm having with
internacionalization.
Im building a web portal in two languages.
I set the catalogues and i've defined the action and transformer like
it was in the samples, and i changed the location to other place in webapp
so this it how it comes : it is a very simple example that doesn't work.
sitemap:
-----------------------------
<map:components>
<map:transformers default="xslt">
<!-- Configure i18n transformer -->
<map:transformer name="i18n"
logger="sitemap.transformer.i18n"
src="org.apache.cocoon.transformation.I18nTransformer">
<catalogues default="messages">
<catalogue id="messages" name="messages"
location="translations"/>
</catalogues>
<cache-at-startup>true</cache-at-startup>
</map:transformer>
</map:transformers>
<map:actions>
<map:action name="locale" logger="sitemap.action.locale"
src="org.apache.cocoon.acting.LocaleAction">
<create-session>true</create-session>
<store-in-session>true</store-in-session>
<store-in-request>true</store-in-request>
<store-in-cookie>false</store-in-cookie>
</map:action>
</map:actions>
</map:components>
<map:pipelines>
<map:pipeline>
<map:act type="locale">
<map:match pattern="test">
<map:generate src="test.xml"/>
<map:transform type="i18n">
<map:parameter name="locale"
value="{request-param:lang}"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
</map:act>
</map:pipeline>
</map:pipelines>
</map:sitemap>
test.xml:
---------------------
<document xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
<test><i18n:text>a_key</i18n:text></test>
</document>
2 messages files: messages_fr / messages_pt
---------------------
<catalogue xml:lang="fr">
<message key="a_key">Ceci est la valeur d'une clé.</message>
</catalogue>
<catalogue xml:lang="pt">
<message key="a_key">Isto é o valor de uma chave.</message>
</catalogue>
and what im getting always is:
------------------------------
<document>
<teste>a_key</teste>
</document>
I even changed in cocoon.xconf the location to
<catalogue-location>context://i18n/translations</catalogue-location> and made a
restart
What am i doing wrong ?
I'm using cocoon-2.1.8 with j2sdk1.4.2_08
Thank you in advance
19-12-2005
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]