On Oct 23, 2008, at 8:22 AM, Justice Utete wrote:

Hi,

I'm having a problem with cocoon i18n. I have a Generator which does some processing then generates XML. I also have some xls files which are basically for translation and the html styles. Mt problem is: When i use the deafault file generator, the pages are translated succesfully but when i use my Generator the files are not translated at all...

This is what my sitemap looks like

        <map:match pattern="*.htm">
                    <map:generate type="MyGenerator">
                        <map:parameter name="user" value="test"/>
                    </map:generate>
                    <map:transform type="cinclude">
<map:parameter name="support-caching" value="true"/>
                        <map:parameter name="expires" value="600"/>
                        <map:parameter name="parallel" value="true"/>
                    </map:transform>
                    <map:transform type="xalan" src="{1}.xsl"/>
                    <map:act type="locale">
                     <map:transform type="i18n">
                       <map:parameter name="locale" value="{locale}"/>
                     </map:transform>
                     </map:act>
                    <map:serialize type="html"/>
                </map:match>
This above does not work.

But it works when i change to the following:
            <map:match pattern="*.htm">
            <map:generate src="{1}.xsl"/>
            <map:transform type="cinclude">
<map:parameter name="support-caching" value="true"/> <map:parameter name="expires" value="600"/> <map:parameter name="parallel" value="true"/>
                            </map:transform>

                    <map:act type="locale">
                        <map:transform type="i18n">
<map:parameter name="locale" value="{locale}"/>
                        </map:transform>
                     </map:act>
                     <map:serialize type="html"/>

I cant use the second method because I need the data returned by MyGenerator.

You've tried with one generator where i18n translation doesn't work, but if you use a different generator, then it does work... right?

So... you've looked at the output from the generator where it works, and also from the generator where it doesn't work, and they are different how? :-)

Does anyone know how I can get this to work?

Fix your generator? :-)

But seriously... the i18n transformer transforms XML, and if it "works" here and "doesn't work" there, then it's probably because the XML "there" is no good, and you'll really need to have a look at the XML to find out what's no good about it. And when you do, in all likelihood that will point you right toward what you need to fix.

cheers,
—ml—

Reply via email to