Bug #56533
Backend language class in frontend prevents use of other languages
Status:
New
Priority:
Must have
Assignee:
-
Target version:
-
Start date:
2014-03-04
Due date:
% Done:
0%
TYPO3 Version:
4.5
Patch is reviewed:
No
Has patch:
No
Description
This extension currently creates a language
(EXT:lang/lang.php) instance in tx_ratings_api::generateRatingContent()
if there is no $GLOBALS['LANG']
object, which is usually the case in the frontend.
However, the language
class is explicitely meant to be used in the TYPO3 backend. That class only supports a fixed list of languages (constant TYPO3_languages
, defined in t3lib\config_default.php) contrary to tslib_fe
which supports any language.
Currently using a language shortcode not mentioned in TYPO3_languages
yields in a fallback to "default" and thus no translation.
Simply using $GLOBALS['TSFE']->sL()
in the TYPO3 frontend does the trick.