[TYPO3-core] RFC: Templavoila + Core fixes

Kasper Skårhøj kasper2006 at typo3.com
Wed Mar 15 00:48:53 CET 2006


>

Hi Bernhard. The important acknowledgement is in the end of this  
mail. In the meantime I somehow went into self-oscillation and  
generated a lot of response which is only meant to further clarify,  
not counter what you said. In fact I think we are on the same page  
now, thats great.




> I tought this way: If I want to have the same structure I have  
> langChildren=1 ...
> all languages will necessarily have the same fields and just the  
> value of each field
> is switched depending on the language --- this is necessary in my  
> view of the things
> cause one tt_content element has 3 different ID's in default/german/ 
> dansish.

I was just inspired to another visualization, forgive me:


This is what you suggest (Inheritance for a container ):
lDEF / Container / vDEF => 123
lDEF / Container / vDA => 453
lDEF / Container / vDE => 678

This is what I suggest:
lDEF / Container / vDEF => 123
                                                  \ - Localization  
(sys_language=DK, transl. original=123) => 453
                                                  \ - Localization  
(sys_language=DK, transl. original=123) => 678


When "sys_language_overlay" is set 123 will _not_ be displayed when a  
localization is found for the language displayed.

The result of these two will be the same. I think the latter is more  
easy and technically better. Especially because there is a clear  
relation between the localized record (453/678) and its original.  
This is not the case in the upper suggestion.

Then you will probably say that this relation could still exist:

lDEF / Container / vDEF => 123
                                                  \ - Localization  
(sys_language=DK, transl. original=123) => 453 **
                                                  \ - Localization  
(sys_language=DK, transl. original=123) => 678 **
lDEF / Container / vDA => 453	*
lDEF / Container / vDE => 678	*


... BUT this is where the mistakes comes: Element 453 and 678 is now  
used two places in the structure. so in which location will it be  
used? Well, of course they will be taken from the vDE/vDK values,  
marked *,  because you use inheritance mode. But then it is  
misleading that it is also attached to the record in the default  
display, marked **, (conceptually) !

Bottomline:
- I think that if you want to place localized records in different  
vDEF/vDA/vDE then these elements must be understood as independent  
records with independant content: localizations, not translations.
- If you wish to provide translations you should use not use vDEF/vDA/ 
vDE, but only vDEF and then use the localization relations to select  
the correct record for display.
- Finally; There is an aspect of taste involved and I don't mind if  
others wants to use a variant as long as it is technically sound.



>
> I think I understand your approach to have landDisable=1 in the  
> pageDS and then simply put
> content elements in ... the german editors will only see the german  
> and ALL ones and in the
> FE also only those will get shown (thanks to CONTENT).

Yes, thanks to CONTENT and "sys_language_overlay = hideNonTranslated"


>
> Oh ... and I think I get it just right now ...
>
> When you insert a container this is also langDisable=1 and you  
> insert into a CE-field of the
> container again mixed ALL/default/german/dansk content elemnts . is  
> that correct ?

Well, you can do it in two ways:

(Not recommended!) Insert a default/danish/german element after each  
other; they will be shown only when their language is selected:
lDEF / Container / vDEF => 123, 453 (DK), 678 (DE)


(Correct) Insert the default element (123) and localize it (453 and  
678 not referenced from CE but rather pointing to 123 as their original)
lDEF / Container / vDEF => 123
                                                  \ - Localization  
(sys_language=DK, transl. original=123) => 453 **
                                                  \ - Localization  
(sys_language=DK, transl. original=123) => 678 **


>
> I see ... that's a very nice approach.
>
> I think what Robert intended it differentky (correct me if i'm  
> wrong). here an example for
> langChildren = 1
>
> FCE with ContenElement-fields (containers in your terms):
> <lDEF>
> 	<field_content_left>
> 		<vDEF>123</vDEF>
> 		<vEN>123</vEN>
> 		<vDK>123</vDK>
> 	</field_content_left>
> 	<field_content_right>
> 		<vDEF>23</vDEF>
> 		<vEN>55</vEN>
> 		<vDK>84</vDK>
> 	</field_content_right>
> </lDEF>
>
> if 123 is the UID of a FCE which is internally translated by either  
> Inheritance or Separation
> (to use your terms)
> and 55 and 84 have translOriginalPointer set to 23 ...
>

Exactly! This is how Robert made it work.

My point is that it is "double localization" if you have both 55 and  
84 in vEN/vDK and have translOriginalPointer set to 23!

So there are two options. Either:

(My recommendation:)
<field_content_right>
	<vDEF>23</vDEF>
	<vEN></vEN>
	<vDK></vDK>
</field_content_right>
+ translOriginalPointer of 55 and 84 = 23
(sys_language_uid of 55 and 84 points to their language of course)

(The alternative which will work and is OK but will not have a  
semantic binding between localization):
<field_content_right>
	<vDEF>23</vDEF>
	<vEN>55</vEN>
	<vDK>84</vDK>
</field_content_right>
+ translOriginalPointer of 55 and 84 = 0
(sys_language_uid of 55 and 84 points to their language of course)


- kasper


>
>
>> Anyway, what about if you set up a page on your demo site (using my
>> un-patched version of TemplavOila!!), put in some content that we can
>> preview on the site, then I will build the same page using my  
>> concept.
>
> I will do that on demo2/
>
> greets,
> Bernhard
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core


- kasper

"A contribution a day keeps the fork away"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3





More information about the TYPO3-team-core mailing list