In the current trunk, I've introduced the notion of "translation
groups".
Each page can optionally belong to a group of pages in other languages,
which is expressed in a separate database table.
If you hit "create translation" on a page in the CMS, the new translated
page will automatically be added to the same group.
This grouping can then be used to implement features like "show this
page
in language X", without requiring a master language.
It also means that you can switch the CMS to a completely new language
without existing pages, and start creating pages without a relation to
another language
in the empty tree. Also, pages can be deleted from certain languages
without affecting other pages, as they just dissapear from the group.
Now, there is no direction or hierarchy in groups - meaning
its currently unclear which original a translation is based on.
The CMS interface shows the original readonly fields
based on two factors:
1. Is the page in the default language? => No original fields are shown
2. If page is in non-default language, try to get original in default
language. If thats not existing, fall back to the first available
other language in this translation group.
In the future, we'd like to give translators the option to select
which original language
they want to see.
It gets more complicated if this relation to an original is required
for the actual data,
namely blacklists or whitelists for columns. For example, translating
a price on
a product wouldn't make sense, but currently there is no way to
exclude columns
from Translatable. I'll post about this in a separate discussion. For
the "translation groups"
aspect - should we retain a more strict relation to an original in
addition
to the undirected "translation groups"? With the new model, this
relation could break
anytime by somebody deleting the original, but it would provide us
with information
about which language should have non-translatable fields in edit mode,
as opposed to showing them readonly on translations.
-------
Ingo Schommer | Senior Developer
SilverStripe
http://silverstripe.com
Phone: +64 4 978 7330 ext 42
Skype: chillu23