cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <>
Subject RE: == I18N question ==
Date Mon, 29 Jul 2002 16:13:03 GMT
That's excellent!  How would I get a copy of that?

> From: Alex Romayev [] 
> Konstantin,
> Thanks for the link to the forest-dev thread.  I've
> been going back and forth around the 1 vs. many
> issue for a while now.  I'm migrating my website
> JSP to Cocoon and looking for a better approach to
> what I have at the moment.
> My website does not use a database -- it's a pretty
> simple site and I'm trying to keep it XML only. 
> Because of this I have a number of "business"
> stored as XML records.  For example:
> <person id="1" sex="male">
>     <dateOfBirth>1923-08-09</dateOfBirth>
>     <firstName>Alex</firstName>
>     <lastName>Romayev</lastName>
>     ...
> </person>.
> Currently I have a file per language, e.g.,
> people_en.xml, people_ru.xml, etc.  This causes data
> duplication (id, sex, dateOfBirth, etc) and
> synchronisation issues when non-translatable data
> changes -- basically the "people" in different files
> effectively become different entities and you have
> work hard at keeping them the same.


> The option of referencing the translatable elements
> from the translation files seems really awkward you
> still have your business entity scatted across
> files and it doesn't sound like translation of
> elements outside context is a very intuitive task.


> I'm leaning toward the third option, which is what
> Sylvain was suggesting, i.e:
> <person id="1" sex="male">
>     <dateOfBirth>1923-08-09</dateOfBirth>
>     <firstName lang="en">Alex</firstName>
>     <lastName lang="en">Romayev</lastName>
>     <firstName lang="fr">French Alex</firstName>
>     <lastName lang="fr">French Romayev</lastName>
>     ...
> </person>.

To be exact, he were suggesting:

     <firstName xml:lang="en">Alex</firstName>
     <lastName xml:lang="en">Romayev</lastName>

> However, it seems that it is not being favoured much
> by the community.  Is there some other option that
> missing?  Also, you've mentioned that you had a
> different version of I18nTransformer -- would it be
> able to filter out language specific attributes?

Yes, the new version have inline translation
capabilities, e.g.:

<i18n:when locale="en">One</i18n:when>
<i18n:when locale="ru">oDIN</i18n:when>

It already works and probably this week I'll perform
some cleanup and 
commit it (I need to synchronize it with the current
CVS, cause my 
version is rather old).


> Thanks,
> -Alex

Do You Yahoo!?
Yahoo! Health - Feel better, live better

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message