Added: Add Languagestrings dynamically via function

This commit is contained in:
kolaente 2016-07-03 15:53:35 +02:00 committed by kola
parent 0fb4026d8b
commit 3cadac4094
2 changed files with 11 additions and 1 deletions

View File

@ -16,4 +16,8 @@ echo $lang->get('fail');
echo '<pre>';
print_r($lang->getAll());
echo '</pre>';
echo '</pre>';
$lang->set('Test in english', 'test', 'en');
$lang->set('Test auf Deutsch', 'test', 'de');
echo $lang->get('test');

View File

@ -117,4 +117,10 @@ class lang
}
}
}
//Set Langstrings
function set($string, $identifier, $lang)
{
$this->langfiles[$lang]['langstrings'][$identifier] = $string;
}
}