[TYPO3-templavoila] Continue f. t.team.core: Templavoila localization
Kasper Skaarhoej
kasper2006 at typo3.com
Fri Mar 17 12:47:56 CET 2006
Hi Bernhard, Franz and Dmitry,
In the ideological fight between the R and K paradigms of versioning I found
more ammunition. I'm not presenting this to shoot you down because I want to
win. I must say that it has opened my eyes to some advantages to understand
the R-paradigm, but I also find more and more reasons to believe in the
K-paradigm which is supported by my gut-feeling. Here are a few additional I
came up with:
(In the following I will call "Default language" for "English" and the
Alternative language for "Danish"):
1:
In the R-paradigm you have a Page DS with "Inheritance" or "Separate" mode
(<langDisabled>=0).
Naturally you build pages by placing references to English content elements
in <vDEF> (or <lDEF> for "Separate" mode) while Danish content elements are
placed in <vDA> (or <lDA> for "Separate" mode).
In the R-paradigm you want a link under the default elements which a) creates
a copy of the element and b) links it into <vDA> at the right position. In
itself that requires that other elements in <vDEF> and <vDA> is somehow
listed in the same order because how could you otherwise find the element
above or below to position the localization correctly? And what if the order
is changed for Danish? What sense does it make to try to position the new
localization "correctly"? Anyway, I assume you has an answer for that...
(that is not even the problem I'm trying to describe here, read on ...:-)
But imagine that in <vDEF> and <vDA> you have inserted (in each) a new
Flexible Content Element (FCE) with two container fields, "Column Left" and
"Column Right".
In the "Column Left" of the English FCE you insert an "Text" content element
now. What should happen when the user clicks the "Click here to create a
localization copy" link? Well, obviously it should create a localized copy
and create a reference in the similar 2-column FCE that was inserted in the
<vDA> of the page structure! In otherwords, it is not so simple as with the
Page Structure; there it was just a question of inserting a reference in
<vDA> of the same element (the page) but now you must insert the reference in
<vDA> of _another_ element! Try to take that to the 2nd level where you have
a FCE container in another FCE container... what a mess!!
Further, it is clear that for such FCE containers the <langDisable> should be
1 (that is localization is disabled) because they are already placed in an
English or Danish context.
What we learn: Trying to place references of new localized elements is futile
when you think of deep page structures with nested FCEs!
2:
Now, lets take a FCE which has only value fields. Since a FlexForm allows you
to localize the structure internally there is a lot to gain by doing that.
For instance, using the "Inheritance" mode means that for any FlexForm
structure as deep as you like you can have a translation to Danish for each
English value. The advantage is that to a translator it is clear what to
translate. And you can impose inheritance rules so that for instance fields
with images or links can be inherited from the English value; thus the
translator only translates titles and real content.
If you want to use the R-paradigm you have to wave goodbye to this
functionality unless you share the element between English and Danish by
inserting a reference to the same element in both <vDEF> and <vDA>.
Because if you don't share that reference but uses the "click here to
localize" link you will get a copy. But with the copy you cannot inherit
values and using "Inheritance" mode is useless, even confusing. Because
adding danish translation for the element in the "English" structure makes no
sense (and vice versa).
What we learn: FCEs with values must either have localization disabled and
work like any other content element type (thus loosing inheritance features)
or they must be shared for both languages (which imposes overhead on the
translator to know about that they must create references for those
elements).
- kasper
More information about the TYPO3-project-templavoila
mailing list