Forum OpenACS Q&A: Re: RFC: How to internationalize content

Collapse
Posted by Dave Bauer on
Joel,

I am not aware of any existing code that uses the cr_revisions.locale information.

One possibility to support custom applications we are not aware of would be to add cr_items.locale and wait one release cycle to remove cr_revisions.locale.

Jun,

I think the "localized" tag makes more sense, and it won't affect our plans.

One use case that is not addressed is determining which localization of an item was used to translate from. I think this is applicaiton specific and can be accomodated by recording this additional relationship seperately. I think it is necessary to tie all localized items to one "master" content_item. This makes it efficient to show a list of all localized versions of an item. An example would be if an item was origianlly written in english, then translated to french, and subsequently was translated from french to german.

Collapse
Posted by Guan Yang on
Here's a suggestion from the meaning of 'translated' and 'localized':

Item A: Original English item
Item B: French version translated from item A
Item C: German version translated from item B

Both items B and C have parent_id pointing to item A with the tag 'localized'.

Additionally, C has a rel with item B with the tag 'translated'.

This means that 'translated' means 'based on this item', while 'localized' means 'is this this item in language X'.

Collapse
Posted by Joel Aufrecht on
There actually already is a cr_items.locale.  The only problem is that it's a Foreign Key to cr_locales.locale, which is varchar(4), whereas ad_locale.locale is varchar(30) and in practice contains only five-character strings.  The upshot is that the upgrade should be really easy.  We just have to change the fk to use ad_locale, and figure out how to handle any data currently using cr_locales.  How about just doing a one-time mapping from the initial values of cr_locale.locale to those of ad_locale.locale, and throwing an error back to the upgrader for locales not in the mapping?  I'd like to get this into 5.2.
Collapse
Posted by Malte Sussdorff on
The upgrade should be plain and easy as we can use the nls_charset / nls_territory used in both tables to find out the correct ad_locale function. Not to mention that we only have US in cr_locales anyway in a new installation ....

I will do this upgrade on our system and write a TIP for it.