[TYPO3-dev] localizing fe_groups

Manuel Kammermann manuel.kammermann at unibas.ch
Mon Apr 7 22:54:24 CEST 2014


Hey list

I have been struggling with the following problem:


I have written an extension which handles it’s own localized records. Now signing up for a membership is realized with fe_groups and subgroups. This works fine in the default language. But I want to localize the registration form where the kind of registration (full, monthly etc.) is the selection of a fe_group.

so in my extension i put in tca.php

$columnArray = array(
'sys_language_uid' => $TCA['tx_myex']['columns']['sys_language_uid'],
'l18n_parent' => $TCA['tx_myex']['columns']['l18n_parent']
);
$columnArray['l18n_parent']['config']['foreign_table'] = 'fe_groups';
$columnArray['l18n_parent']['config']['foreign_table_where'] = 'AND fe_groups.pid=###CURRENT_PID### AND fe_groups.sys_language_uid IN (-1,0)';

t3lib_extMgm::addTCAcolumns('fe_groups', $columnArray);


and in ext_tables.php i put:

t3lib_div::loadTCA('fe_groups');
$TCA['fe_groups']['ctrl']['languageField'] = 'sys_language_uid';
$TCA['fe_groups']['ctrl']['transOrigPointerField'] = 'l18n_parent‘;

and finally in the ext_tables.sql i put:

#
# Alter fe_groups table for localization
#
CREATE TABLE fe_groups (
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l18n_parent int(11) DEFAULT '0' NOT NULL
);




So now, what happens is, that in the list view with localization view, I get the column for the available languages to localize to. I don’t get the flag in the [Localization] column (the flag of the default language should be there if no translation was created so far). When i press on the flag for localization, another record is created, but in the default language and no entries in sys_language_uid or l18n_parent are done…



an idea/tipps for me?


Best

Manuel


PS: TYPO3 v4.5.30



More information about the TYPO3-dev mailing list