Hi,

I'm having problems with cocoon internationalisation.

The following are snippets of my code:

Portion of the sitemap:

<map:transformers default="xslt">
    <map:transformer name="i18n" logger="sitemap.transformer.i18n"
src="org.apache.cocoon.transformation.I18nTransformer">
        <catalogues default="messages">
            <catalogue id="messages" name="messages" location="*
actions/translations*"/>
        </catalogues>
        <cache-at-startup>true</cache-at-startup>
        <untranslated-text>untranslated text!</untranslated-text>
    </map:transformer>
</map:transformers>

*Note: actions/translations is in the same folder as the sitemap*

.. and then the pipeline for the page:

<map:match pattern="*.htm">
    <map:generate type="UserRequest"/>
    <map:transform src="{1}.xsl"/>
    <map:transform type="i18n">
        <map:parameter name="locale" value="{locale}"/>
    </map:transform>
    <map:serialize type="html"/>
</map:match>

The xsl page to be transformed has the following:
    <i18n:text>key1</i18n:text>

and in my messages xml  file I have:

<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="en">
    <message key="key1">Message for Key 1</message>
    <message key="key2">Message for Key 2 </message>
</catalogue>

However when i access  the page it displays "key1" instead of the value for
key1 which is "Message for Key 1".
Whats is the problem with the above?


Regards,

Justice

Reply via email to