[TYPO3-core] RFC: Templavoila + Core fixes

Bernhard Kraft kraftb at kraftb.at
Tue Mar 14 21:38:14 CET 2006


Kasper Skårhøj wrote:

> guide is available here: http://194.117.233.66/t3dl/ 
> localization_guide_2.pdf Therefore: Any objections should be given  

Hello again !

I split this mail up in 3 different sections :)


About Kaspers document
======================

I now read it - it could do this so fast as I already knew most of it ... the only
new things for me were:

* Direct 1:1 content-binding using "defLangBinding"
* what I can do with TO local processing (i knew about langOverlayMode - but only in DS)
* HIDE_L10N_SIBLINGS displayCond
* It was somehow new to me to use langDisable=1 for pages :) but still do translations (only display those
CE's which have the correct or ALL language set)

And I have a few points to notice on your document which with I dont quite agree (if that
counts :) for example I never use langDisable=1 ... even for containers.

I mean else I would have to insert either 2 really-different (different uid) content elemnts
into both pages pointing to the translated content elements. I mean the uid of the default-language
CE #1 (example) which is referenced in lDEF|field|vDEF will not be the same for all languages ...
so I cant use sys_language_uid=-1 (ALL) for those containers. ... this is nicely shown in the demo
i have set up for you. read below.

That the referenced content elements are the same in all languages will only be the case if I you
only insert FCEs which are translated internally (langDisable=0).


I will try to import your document into a wiki and make it available on my server on a htaccess protected
page so we can comment it ...

may it be possible to get the .sxw file ?



Demo of my patch:
=================

http://think-open.org/kraftb/demo/typo3/

U/P: core / testing

I have created a few pages on which you can try to translate and view the results. (Home n, Download n)

Of course you will have to delete translated CE's completely before you can translate the langOrig again.

The difference why the FCE's (mostly FCE's are inserted) on the Download pages get's displayed differently
is because of the TSConfig on the Download pages.



About my patch:
===============

My patch did not revert to the "old" method of letting TV handle the translation but rather modified it
and combined it with the TCE_main method.

First of all I have to say that a feature (could be bug) I'm missing for a long time is that it would be possible
to get the UID's of newly created/copied/localized elements from typo3/tce_db.php. I think you must say that it is
a flaw that an application which has a link to tce_db.php and uses it to localize a record for example  can't get
the UID of the localized CE if there is no API for that. (records must not always be localized from the list or
page module - TV shows us that. And I would have/have the problem for example that my "Content Table" extension,
which uses Flexforms similarily like TV to store references to other content elements (in this case the containers
are table-cells), cant know which UID shall get inserted in a translated table cell.)


The API I would suggest and implemented in my patch is to simply add a special paramaeter "&result[..." to the
returnUrl of tce_db.php

In my patch the returnUrl also has the &source= value pointing to the field which got localized. This allows TV to
handle the TV-specific part of inserting the localized CE into the specific field (either lEN|field_content|vDEF or
lDEF|field_content|vEN depending wheter langChildren is 0 or 1)


I tought over it and noticed that it might break compatibility with other extensions using tce_db.php and setting
&result to their own value in the returnUrl - I can avoid this by making the append of this string configurable.





greets,
Bernhard



More information about the TYPO3-team-core mailing list