[Product-Developers] Announcing collective.multilingual

Malthe Borch mborch at gmail.com
Wed Oct 3 10:49:16 UTC 2012


On 3 October 2012 11:51, Ramon Navarro Bosch <ramon.nb at gmail.com> wrote:
> Maybe you’ve noticed Malthe has committed the code of a new package to the
> collective: collective.multilingual. After some discussion and interchanges
> of points of view, he decided to abandon the line we’ve set with PAM and
> wanted to make his own implementation.

Yep!

> About Language Independent solution, as collective.multilingual is for DX
> only and someday will have an implementation, we used the IObjectModified
> event to copy the elements that are independent to all the translated
> languages. We pay a bit of time on edit but it's faster on read.

This is the same. I don't think there's a way to avoid this without
things getting very complicated. But usually this data is small. If
it's an image – then it's probably a persistent object in its own
right and we'll only be copying a reference.

> About DAG, on plone.multilingual there is a star implementation because of
> efficiency. But it's easy to implement a DAG on a star, we just found a
> problem with that: if we allow to choose the original translation on edit
> form, from which you want to translate, the "DAG" idea is not 100% clear,
> maybe some day you translate a document to english from catalan, but then
> the spanish version is better and you want to translate from spanish… So we
> thought about forgetting a bit about that by now.

In collective.multilingual, the data structure is a DAG, but we don't
use this information right now.

You mention performance. I think that caching is a good enough answer
here. This not something we've used in collective.multilingual yet,
but perhaps if someone has a case with lots of hits and lots of
languages, then it can be implemented.

> About neutral content, we implemented a neutral shared folder on top where
> content language is always independent and you can browse the folder without
> any problem. I can't see any solutions to this problem on
> collective.multilingual.

The portal root is typically assigned the default site language as its
language. In collective.multilingual, we've got a rule that does not
apply this language to items created in the "neutral" part of the
site. This means that content created under "/" will be assigned a
neutral language, unless Plone is configured to explicitly apply the
default language.

\malthe


More information about the Product-Developers mailing list