diff --git a/controller/Session.class.php b/controller/Session.class.php index 03e38e39..d074d2c7 100644 --- a/controller/Session.class.php +++ b/controller/Session.class.php @@ -6,7 +6,8 @@ class Session KEY_DOWNLOAD_ALLOWED = 'beta_download_allowed2', KEY_PREFINERY_USER_ID = 'prefinery_user_id', KEY_PREFINER_USED_CUSTOM_CODE = 'prefinery_used_custom_code', - KEY_LIST_SUB_ERROR = 'list_error'; + KEY_LIST_SUB_ERROR = 'list_error', + KEY_USER_CULTURE = 'user_culture'; public static function init() { diff --git a/lib/i18n.class.php b/lib/i18n.class.php index 25498bd8..d76688b8 100644 --- a/lib/i18n.class.php +++ b/lib/i18n.class.php @@ -17,6 +17,11 @@ class i18n public static function register($culture = null) /*needed to trigger class include, presumably setup would happen here*/ { + if ($culture == null) + { + $culture = Session::get(Session::KEY_USER_CULTURE); + } + if ($culture === null) { $urlTokens = Request::getHost() ? explode('.', Request::getHost()) : []; diff --git a/web/index.php b/web/index.php index 1dce4aa0..3122f26d 100644 --- a/web/index.php +++ b/web/index.php @@ -25,8 +25,8 @@ if (!IS_PRODUCTION) try { - i18n::register(); Session::init(); + i18n::register(); if (!IS_PRODUCTION) { View::compileCss();