if after all no translation could be found, take the language in the settings

This commit is contained in:
Uwe Steinmann 2013-03-27 09:45:06 +01:00
parent 114b51ebc5
commit 5a3c2d9d4b

View File

@ -73,9 +73,10 @@ function getMLText($key, $replace = array(), $defaulttext = "", $lang="") { /* {
}
if(!isset($LANG[$lang][$key])) {
if (!$defaulttext)
return "Error getting Text: " . $key . " (" . $lang . ")";
else
if (!$defaulttext) {
$tmpText = $LANG[$settings->_language][$key];
// return "Error getting Text: " . $key . " (" . $lang . ")";
} else
$tmpText = $defaulttext;
} else
$tmpText = $LANG[$lang][$key];