[+BUGFIX] Extbase (Persistence): Use correct language-uid for translations
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 11 Jun 2011 23:31:38 +0000 (01:31 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 11 Jun 2011 23:31:38 +0000 (01:31 +0200)
Extbase uses $GLOBALS['TSFE']->sys_language_uid to fetch the correct
translation. This works for sys_language_mode "strict" but
sys_language_content would be the correct language-id to use in all
cases.

Thanks to Benjamin Mack.

Change-Id: I20bbb99f598aab3654668a7df2c23f856fd7c269
Resolves: #26521

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php

index 225be37..ef5c61b 100644 (file)
@@ -952,7 +952,8 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
                        }
                        if (is_object($GLOBALS['TSFE'])) {
                                if ($languageUid === NULL) {
-                                       $languageUid = $GLOBALS['TSFE']->sys_language_uid;
+                                               // get the language UID of the content that should be output
+                                       $languageUid = $GLOBALS['TSFE']->sys_language_content;
                                        $languageMode = $GLOBALS['TSFE']->sys_language_mode;
                                }
                                if ($workspaceUid !== NULL) {