> From: Alex Romayev [mailto:[EMAIL PROTECTED]] 
> 
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to