forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <kpiroum...@apache.org>
Subject Re: Multi-lingual static web site
Date Fri, 05 Sep 2003 06:51:25 GMT
From: "Raymond Penners" <raymond@dotsphinx.com>
> Konstantin Piroumian wrote:
>
> >Yes, i18n transformer is fine for menus, titles, navbars, etc., but not
for
> >documents. Though, it's possible to use it for document translation, e.g.
by
> >paragraph:
> ><p><i18n:text key="first_para"/></p>.
> >
> >Just ask if you need more details on how to use it.
> >
> >
> I have tried to extend the Forrest tabs.xml with the xmlns:i18n
> namespace and used an i18n:text, like this:
>
> <tabs software="MyProj"
>   title="MyProj"
>   copyright="Foo"
>   xmlns:xlink="http://www.w3.org/1999/xlink"
>   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
>  ...
>   <tab label="Home" i18n:attr="label" dir=""/>
>
> Still, the build fails:
>
> validate-xdocs:
> /home/workrave/public_html/src/documentation/content/xdocs/tabs.xml:9:4:
> Attrib\
> ute "xmlns:i18n" must be declared for element type "tabs".
> /home/workrave/public_html/src/documentation/content/xdocs/tabs.xml:18:47:
> Attr\
> ibute "i18n:attr" must be declared for element type "tab".

This is just the validation of your document that fails. You can simply turn
it off somewhere in properties (or just modify the build file and remove the
validate-xdocs target temporarily).

More correct option fix to this is to extend the according DTD to allow
i18n:* elements (or what is used for tabs validation).

>
>
> Do you perhaps have any idea?
>
> I am not really sure where I should place "<map:transform type="i18n">".
> My guess would be here, in sitemap.xmap:
>
> <!-- Pipeline that manages the internal URI space
>        For the external URI space manager, see the next pipeline.
>        Set it to internal-only="true" in production environment -->
>       <map:pipeline internal-only="false">
>          <map:match pattern="**tab-**.xml">
>             <map:generate src="content/xdocs/tabs.xml" />
> -->
> -->            <map:transform type="i18n">
> -->                <map:parameter name="locale" value="en"/>
> -->            </map:transform>
>
>             <map:transform type="linkrewriter" src="cocoon:/linkmap" />

Seems to be the correct place.

I am CC-ing the message to forrest-dev so more people could help with this.

Regards,
  Konstantin

>
>
> Thanks,
> --
> Raymond Penners -*- raymond@dotsphinx.com -*- www.dotsphinx.com
>
>


Mime
View raw message