diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-24 10:31:58 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-24 10:31:58 +0200 |
commit | 553225e1be27f2c58c0995decc10651566add78f (patch) | |
tree | 732bfaeadd77a761b4ed00d7180b7e25d9b55fa7 | |
parent | da28121dcd160045c468b7028ee835b24f0cb965 (diff) |
Fix setting locales under Solaris - use additional .UTF-8 suffix (#1488628)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/include/rcmail.php | 10 |
2 files changed, 7 insertions, 4 deletions
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix setting locales under Solaris - use additional .UTF-8 suffix (#1488628) - Fix email address validation for addresses with IP address in domain part - Fix Larry skin issues in IE7 compat. mode (#1488618) - Fix so subscribed non-existing/non-accessible shared folder can be unsubscribed diff --git a/program/include/rcmail.php b/program/include/rcmail.php index d866919d6..336e9ca71 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -157,14 +157,16 @@ class rcmail extends rcube $this->config->set_user_prefs((array)$this->user->get_prefs()); } - $_SESSION['language'] = $this->user->language = $this->language_prop($this->config->get('language', $_SESSION['language'])); + $lang = $this->language_prop($this->config->get('language', $_SESSION['language'])); + $_SESSION['language'] = $this->user->language = $lang; // set localization - setlocale(LC_ALL, $_SESSION['language'] . '.utf8', 'en_US.utf8'); + setlocale(LC_ALL, $lang . '.utf8', $lang . '.UTF-8', 'en_US.utf8', 'en_US.UTF-8'); // workaround for http://bugs.php.net/bug.php?id=18556 - if (in_array($_SESSION['language'], array('tr_TR', 'ku', 'az_AZ'))) - setlocale(LC_CTYPE, 'en_US' . '.utf8'); + if (in_array($lang, array('tr_TR', 'ku', 'az_AZ'))) { + setlocale(LC_CTYPE, 'en_US.utf8', 'en_US.UTF-8'); + } } |