summaryrefslogtreecommitdiff
path: root/modules/user/helpers/user_event.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-02-10 02:37:16 +0000
committerAndy Staudacher <andy.st@gmail.com>2009-02-10 02:37:16 +0000
commitc2eee4746533af10779934f705138fe9bb567550 (patch)
tree1b97e2e233906117db905bab5d5c2668bfc4c93c /modules/user/helpers/user_event.php
parentdce6548431c4d61ab6c532375a0f030d8de72fd1 (diff)
Move site default_locale into DB (vars) and add a per user locale preference.
There's no UI to select the locale yet.
Diffstat (limited to 'modules/user/helpers/user_event.php')
-rw-r--r--modules/user/helpers/user_event.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/user/helpers/user_event.php b/modules/user/helpers/user_event.php
index 21848e2e..4af1d22f 100644
--- a/modules/user/helpers/user_event.php
+++ b/modules/user/helpers/user_event.php
@@ -23,5 +23,11 @@ class user_event_Core {
*/
static function gallery_ready() {
user::load_user();
+
+ $locale = user::active()->locale;
+ if (!empty($locale)) {
+ // TODO(andy_st): Check session data as well.
+ I18n::instance()->setLocale($locale);
+ }
}
}