summaryrefslogtreecommitdiffstats
path: root/include/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2010-03-14 14:11:52 -0700
committerArun Persaud <arun@nubati.net>2010-03-14 14:33:31 -0700
commit83fc1a851c69e13808d14f2d5a284c3369409018 (patch)
tree67d2da7a1481269aa939b898f3fd1be4507cf869 /include/db.php
parentc05246b378470eab9c172d8d96328a821302a273 (diff)
downloade-DoKo-83fc1a851c69e13808d14f2d5a284c3369409018.tar.gz
e-DoKo-83fc1a851c69e13808d14f2d5a284c3369409018.tar.bz2
e-DoKo-83fc1a851c69e13808d14f2d5a284c3369409018.zip
NEW FEATURE: added localization support
using gettext to add support for localization
Diffstat (limited to 'include/db.php')
-rw-r--r--include/db.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/db.php b/include/db.php
index 2a927f5..ad6c6f0 100644
--- a/include/db.php
+++ b/include/db.php
@@ -772,6 +772,7 @@ function DB_get_PREF($myid)
$PREF['vacation_start'] = NULL;
$PREF['vacation_stop'] = NULL;
$PREF['vacation_comment'] = '';
+ $PREF['language'] = 'en';
/* get all preferences */
$r = DB_query('SELECT pref_key, value FROM User_Prefs'.
@@ -825,8 +826,14 @@ function DB_get_PREF($myid)
if($pref[1])
$PREF['vacation_comment'] = $pref[1];
break;
+
+ case 'language':
+ if($pref[1])
+ $PREF['language'] = $pref[1];
+ break;
}
}
+ $_SESSION['language'] = $PREF['language'];
return $PREF;
}