cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: I18n
Date Thu, 11 Jul 2002 09:01:10 GMT
> From: Alex Romayev [mailto:romayev@yahoo.com] 
> 
> Hi all,
> 
> I'm trying to figure out how to build an
> internationalised web site.I've read the documentation
> on Cocoon I18n and looked at the samples.  I
> understand how its dictionary approach works for
> lables, messages and instructional copy, however I
> don't understand how I would use it if I have business
> entities.

Business entity internationalization is a big task that involves also
internationalized business processes, data handling, etc. So if you have
business data that should be multilingual then you should store it
somewhere, the best place is the DB. 

> 
> For example, let's say I want to model a person with
> the following XML:
> 
> <person>
>   <dateOfBirth>Some date</dateOfBirth>
>   <passportNumber>12345678</passportNumber>
>   <name lang="en">English Name</name>
>   <name lang="fr">French Name</name>
>   ...
> </person>
> 
> Keeping names in a dictionary separate of the record's
> context seems a bit awkward, plus some attributes,
> like DOB and passportNumber are not translatable.

Yes, you don't need to keep this data in i18n dictionary, cause it's
business data and it's dynamic. The names for a person you should store in
the DB (or other store where all your business data is stored).

You can use i18n transformer to _format_ DOB and passport number depending
on user's locale (but this also can be business dependent, e.g. if your
prices are in USD then you woudn't like to show them localized).

> 
> Any ideas?

So, i18n transformer (in its current state) is good for presentation part
and useless for business data. Use it to format dates, numbers, currencies,
make multilingual UI (forms, menus).

A new version of i18n is in work and it will allow to implement custom i18n
bundles and bundle factories, e.g. a bundle which will connect to your DB
and retrieve data depending on locale. 

Konstantin

> 
> Thanks,
> -Alex
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message