Project

General

Profile

Actions

Bug #61830

closed

Localization of file references broken

Added by Franz Koch about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-09-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The LocalizationUtility from Extbase is using $GLOBALS['TSFE']->sL to translate translateFileReference passed to it, but this is no longer available and thus these translations fail. Removing the FE special case and using $GLOBALS['LANG'] instead.

Before:

static protected function translateFileReference($key) {
    if (TYPO3_MODE === 'FE') {
        $value = $GLOBALS['TSFE']->sL($key);
        return $value !== FALSE ? $value : NULL;
    } elseif (is_object($GLOBALS['LANG'])) {
        $value = $GLOBALS['LANG']->sL($key);
        return $value !== '' ? $value : NULL;
    } else {
        return $key;
    }
}

after:

static protected function translateFileReference($key) {
    if (is_object($GLOBALS['LANG'])) {
        $value = $GLOBALS['LANG']->sL($key);
        return $value !== '' ? $value : NULL;
    } else {
        return $key;
    }
}

Actions

Also available in: Atom PDF