summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-25 15:00:44 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-25 15:00:44 -0700
commitdc67de520d58838d0bf1ab2ba13135745b59facf (patch)
treefcdfb1186761e2b83f386db1fe338c912788bc44 /modules
parent88995e5a2e72fa45202f82ecd9220d3053ad2348 (diff)
parent0be38d143c44902f9482044da5f43c7a05134460 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/libraries/I18n.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gallery/libraries/I18n.php b/modules/gallery/libraries/I18n.php
index 03a6d8f6..b1b4298a 100644
--- a/modules/gallery/libraries/I18n.php
+++ b/modules/gallery/libraries/I18n.php
@@ -77,7 +77,12 @@ class I18n_Core {
// TODO: See G2 for better fallack code.
$locale_prefs = array($locale);
$locale_prefs[] = 'en_US';
- setlocale(LC_ALL, $locale_prefs);
+ $new_locale = setlocale(LC_ALL, $locale_prefs);
+ if (is_string($new_locale) && strpos($new_locale, 'tr') === 0) {
+ // Make PHP 5 work with Turkish (the localization results are mixed though).
+ // Hack for http://bugs.php.net/18556
+ setlocale(LC_CTYPE, 'C');
+ }
}
return $this->_config['default_locale'];
}