[TYPO3-dev] foreign_table_where select current sys_language_uid

Muriel le Pair typo3 at strangefruit.nl
Thu Feb 23 17:06:18 CET 2012


Hi,

I'm developing an multiple language extension and would like in the BE 
to select the records in the foreign_table for the current language.
So if the record of the current language is English only the english 
records should visible etc etc.

'form_terms_conditions' => array (
     'exclude' => 0,
     'label' => 'LLL:EXT:xx',
     'config' => array (
         'type' => 'select',
         'foreign_table' => 'tx_xxx',
         'foreign_table_where' => 'AND (tx_xxx.sys_language_uid = 
###REC_FIELD_sys_language_uid### OR tx_xxx.sys_language_uid = -1)  ORDER 
BY tx_xxx.ref ASC',
         'size' => 1,
         'maxitems' => 1,
         'default' => ''
     )
),

The query above somehow selects a language but not the correct one.

-- 
kind regards,

Muriel le Pair



More information about the TYPO3-dev mailing list