summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-24 10:31:58 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-24 10:32:34 +0200
commit800c5fd043ab23987186bf036562d7ec58fd38d4 (patch)
tree9038251824849e005cfc86751b87832911b3864a /program/include/rcmail.php
parentb7e5ac05da39d35f9f8c73edc46ece3fe91ff411 (diff)
Fix setting locales under Solaris - use additional .UTF-8 suffix (#1488628)
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 44a601635..35e19343d 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -252,14 +252,16 @@ class rcmail
$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');
+ }
}