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 Thu, 04 Sep 2003 10:30:38 GMT
From: "Raymond Penners" <raymond@dotsphinx.com>
> Juan Jose Pablos wrote:
>
> >> I have searched the mailinglist archives and found some references to
> >> the Cocoon i18n translator. What I couldn't find was how to integrate
> >> this with a clean out-of-the-box Forrest installation?
> >
> >
> > I18n is to translate a <itext>Translate this</itext> within a xml
> > document. It would be added possibly after 0.5 release, but I think
> > that is not what are you looking for.
>
>
> The i18n translator approach to translate bits of text from XML
> documents would suffice for now. I understand that there are other
> options, like translating documents as a a whole.

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.

>
> Still, is the i18n translator approach something that  can already be
> made to work with the current version of Forrest, e.g. by tweaking some
> XML files. Or, is this future functionality?
>
> I have tried using some i18n tags but that did not seem to work. I am
> also wondering how Forrest would be able to generate a static site using
> this approach. For example, how does it know that it has to generate
> document.en.html and document.nl.html, given document.xml ?

You should modify the pipelines that generate contents for menus and add
something like:
<map:transform type="i18n">
  <map:parameter name="locale" value="{??}" />
</map:transform>

you should specify the locale to use. For that you can use URLs like
/en/index.html and modify the matcher to extract the locale part and pass it
to the i18n trasformer. Not sure if it's possible to use request parameters
for static site generation.

Also, you should make sure that i18n transformer component is defined.

Seems that this requires quite good knowledge of Cocoon.

-- Konstantin

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


Mime
View raw message