[BUGFIX] getLLL needs to fallback to default language
authorDominique Feyer <dominique.feyer@reelpeek.net>
Fri, 8 Jul 2011 10:36:35 +0000 (12:36 +0200)
committerXavier Perseguers <typo3@perseguers.ch>
Fri, 8 Jul 2011 13:57:33 +0000 (15:57 +0200)
Change-Id: I592cbcbbfa60d08ddd7ebf928136a8b9c4fbe1da
Resolves: #27673
Reviewed-on: http://review.typo3.org/3127
Reviewed-by: Georg Ringer
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/lang/lang.php

index b9077f5..6cff5fe 100755 (executable)
@@ -338,6 +338,12 @@ class language {
                        // Get Local Language. Special handling for all extensions that
                        // read PHP LL files and pass arrays here directly.
                $value = is_string($localLanguage[$this->lang][$index]) ? $localLanguage[$this->lang][$index] : $localLanguage[$this->lang][$index][0]['target'];
+
+                       // Fallback to default language
+               if (trim($value) === '') {
+                       $value = is_string($localLanguage['default'][$index]) ? $localLanguage['default'][$index] : $localLanguage['default'][$index][0]['target'];
+               }
+
                if ($hsc) {
                        $value = htmlspecialchars($value);
                }