[TYPO3-english] backend editors in multilanguage shows only language-restricted relation fields

Andreas Kiessling andreas.kiessling at web.de
Sun Dec 16 01:02:27 CET 2012


Hi,

> 
> I thought that I might missed some configuration or misunderstood some
> basics of multilanguage extension development.
> 
> 'branch' => array(
>             'exclude' => 1,
>             'label' =>
> 'LLL:EXT:dmf_travelagent/Resources/Private/Language/locallang_db.xml:tx_dmftravelagent_domain_model_travel.branch_type',
> 
>             'config' => array(
>                 'type' => 'select',
>                 'foreign_table' =>
> 'tx_dmftravelagent_domain_model_traveltype',
>                 'minitems' => 0,
>                 'maxitems' => 1,
>             ),
>         ),
> 
> I thought that maybe in the 'foreign_where' there might be the option
> for setting a ###language_uid###.
> 
> Maybe would be great to have, any thoughts? I could post a feature
> request for this.
> 

"Usually", you'd add a such a statement:

'foreign_table_where' => 'AND
tx_dmftravelagent_domain_model_traveltype.sys_language_uid IN (-1,0)',

so you can only select records that are set to language "default" or
"all". This is often enough and should also work with Extbase if you
translate all your records.

There is already the possibility to use some dynamic markers to e.g.
limit the records from the current or a configured folder. Have a look
here:
http://docs.typo3.org/typo3cms/TCA-Reference/Reference/Columns/Select/Index.html

You can also access fields from the current record, but you should then
probably add a display condition, so the field will only be visible
after saving the record first.

Please note, that there are/were some issues with the language handling
in Extbase. Some usecases require(d) creating your own queries, but
AFAIR, some of them were tackled with 6.0

HTH,
Andreas


More information about the TYPO3-english mailing list