[TYPO3-mvc] Correct way of creating language overlay records

Matthias Krappitz matthias at nospam.aemka.de
Tue Oct 2 10:10:10 CEST 2012


It's all there. I had all this generated by EXT:extension_builder. Only one 
difference: in my TCA code it says l10n instead of l18n everywhere. What a 
difference does this make?


"Robert Böttner"  schrieb im Newsbeitrag 
news:mailman.156.1349156807.598.typo3-project-typo3v4mvc at lists.typo3.org...

Hi everybody,

do your TCA model definitions contain these parts?

$TCA['tx_yourext_domain_model_entity'] = array (
'ctrl' => array (
...
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
...
)
);

$TCA['tx_yourext_domain_model_entity'] = array (
'types' => array(
'1' => array('showitem' => 'l18n_parent, sys_language_uid, yourproperties, 
... '),
),
'columns' => array(
'sys_language_uid' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.php:LGL.language',
'config' => array(
'type' => 'select',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => array(
array('LLL:EXT:lang/locallang_general.php:LGL.allLanguages', -1),
array('LLL:EXT:lang/locallang_general.php:LGL.default_value', 0)
),
)
),
'l18n_parent' => array(
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.php:LGL.l18n_parent',
'config' => array(
'type' => 'select',
'items' => array(
array('', 0),
),
'foreign_table' => 'tx_yourext_domain_model_entity',
'foreign_table_where' => 'AND 
tx_yourext_domain_model_entity.uid=###REC_FIELD_l18n_parent### AND 
tx_yourext_domain_model_entity.sys_language_uid IN (-1,0)',
)
),
'l18n_diffsource' => array(
'config' => array(
'type' =>'passthrough',
)
),
...
)
);




More information about the TYPO3-project-typo3v4mvc mailing list