[TYPO3-dev] localizing fe_groups

Manuel Kammermann manuel.kammermann at unibas.ch
Mon Apr 7 23:48:54 CEST 2014


So what I could track down is, that it seems like in the php code (mainly the localize() method in class.t3lib_tcemain.php) the record is copied correctly for translation. So I am unsure whether there is a config problem with the database?

If anybody could confirm localizing fe_groups works fine for them with the code i provided i would be happy already ;)


best


manuel

Am 07.04.2014 um 22:54 schrieb Manuel Kammermann <manuel.kammermann at unibas.ch>:

> 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
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list