added function to set language settings
This commit is contained in:
parent
64e2bb734f
commit
321d5e2426
|
@ -24,6 +24,18 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// sets language settings for i18n
|
||||||
|
function setlanguage() {
|
||||||
|
if ($_SESSION['language']) {
|
||||||
|
$language = explode(":", $_SESSION['language']);
|
||||||
|
putenv("LANG=" . $language[1]);
|
||||||
|
setlocale(LC_ALL, $language[0]);
|
||||||
|
$locdir = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/locale";
|
||||||
|
bindtextdomain("lam", $locdir);
|
||||||
|
textdomain("lam");
|
||||||
|
}
|
||||||
|
else echo _("Language not defined in session!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
|
|
Loading…
Reference in New Issue