forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <kpiroum...@apache.org>
Subject Re: Multilingual sites
Date Fri, 14 Jun 2002 08:59:07 GMT
From: "Sylvain Wallez" <sylvain.wallez@anyware-tech.com>


> Hi forresters,
>
> I'm currently considering the use of Forrest to rebuild the static part
> of my company's website. However, our site needs to be multilingual (at
> least french and english), and I'd like to share some thoughts and have
> your opinion.
>
> An important hypothesis is that the site will provide the same content
> for all languages. So my idea is to have each xdoc file contain the same
> content in the different languages in order to both ease translation
> work and ensure structural consistency.

Why not to use i18n transformer and have translations in separate dictionary
files? How would having all translations in content ease the translation
work? Your translators should go through all the xdocs and duplicate all the
elements. And how would you translate attributes (sometimes you'll need it
too)?

Of course, if the number of pages is not big then your approach is Ok, but I
wouldn't recommend to mix translations and the content.

>
> Here's an example :
> <document>
>   <section>
>     <title xml:lang="en">A multilingual document</title>
>     <title xml:lang="fr">Un site multilingue</title>
>     <p xml:lang="en">Here's a paragraph</p>
>     <p xml:lang="fr">Voici un paragraphe</p>
>   <section>
> </document>

i18n transformer version of the same doc:

<document>
  <section>
    <title><i18n:text>A multilingual document</i18n:text></title>
    <p><i18n:text>Here's a paragraph</i18n:text></p>
  <section>
</document>

Note, that you can use shorter keys instead of the text itself.

>
> Note that the above couldn't have been possible with the section title
> as an attribute (referring to the recent vote on this).

It could be translated by the i18n transformer, though:
<section title="mydoc.title" i18n:attr="title">...</section>

>
> Building the site for a particular language will then be a simple matter
> of filtering elements belonging to that language before formatting by a
> language-agnostic skin.

Yes, quite simple. I have to think if such functionality will be useful in
i18n transformer too.

>
> Any comments and criticisms are welcome.

Just take a look at i18n samples and please tell me if it suits your needs
or your still prefer your approach. If you choose my version than I have a
new more advanced implementation of i18n transformer that I have no time to
test a little more and commit.

Konstantin

>
> Sylvain
>
> --
> Sylvain Wallez
>   Anyware Technologies                  Apache Cocoon
>   http://www.anyware-tech.com           mailto:sylvain@apache.org
>
>


Mime
View raw message