[TYPO3-english] sys_language_uid, fallback on default language

Markus Klein klein.t3 at mfc-linz.at
Wed Mar 14 12:40:00 CET 2012


Hi!

One way to do it is:

// language overlay
if ($GLOBALS['TSFE']->sys_language_contentOL) {
	$OLmode = $GLOBALS['TSFE']->sys_language_contentOL;
	$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($table, $row, $GLOBALS['TSFE']->sys_language_content, $OLmode);
}

Kind regards
Markus

> -----Original Message-----
> From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] On Behalf Of Muriel le Pair
> Sent: Wednesday, March 14, 2012 12:25 PM
> To: typo3-english at lists.typo3.org
> Subject: [TYPO3-english] sys_language_uid, fallback on default language
> 
> Hi,
> 
> I have a fairly simple question. I have a multi language extension. If there are no records in the current language it needs to fetch the
> records of the default language.
> 
> I am fetching the records as follows:
> AND sys_language_uid = '.$GLOBALS['TSFE']->sys_language_uid
> 
> But this query only select the records of the current language.
> 
> So what is the correct way for TYPO3?
> 
> I thought sys_page->getRecordOverlay() would do the trick. But somehow the records are not translated, maybe this is because the
> original query uses a join.
> 
> $GLOBALS['TSFE']->sys_page->getRecordOverlay($table,$item,
> $GLOBALS['TSFE']->sys_language_uid);
> 
> --
> kind regards,
> 
> Muriel le Pair
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list