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

Collapse
Posted by Malte Sussdorff on
I am wondering about one thing though. Why do we bother with seperate items if we are saying that we need to unpublish / delete translated items once we delete the orginiating item.

Reason I am asking: If we are linking the translated items in a fixed manner to the original item and have to maintain all this, why not go the easy way and say:

There exists one item. This item has a latest revision and a published revision in it's default locale (cr_items.locale).

Additionally it can have other revisions that have other locales (cr_revisions.locale). A special mapping table (cr_item_locale_map) will map the the item_id, locale, published_revision, latest_revision.

This will not break any existing code, as latest and live revision in cr_items are still treated the same way. We would just add code to content::item::get_best_revision to look first in the mapping table and if it can't find anything according to the rules defined in point 9 of Joel's initial draft, then return the revision_id as before. This would also make it easier for existing applications to make use of internalization of content, as a lot are using get_best_revision already.

I would probably go and implement this for ETP unless there is an outcry saying we definitely need content_items for each language. And if the more complex solution is needed, I am absolutely in favour of someone implementing it, but my guess is, due to the fact that it was not implemented yet, it might as well never be. Not to mention that both ideas can coexist beautifully.