diff options
| author | Andy Staudacher <andy.st@gmail.com> | 2009-08-25 13:32:57 -0700 | 
|---|---|---|
| committer | Andy Staudacher <andy.st@gmail.com> | 2009-08-25 13:32:57 -0700 | 
| commit | 0be38d143c44902f9482044da5f43c7a05134460 (patch) | |
| tree | c092439de74bbd529f70474cb03277e68e81587a /modules/gallery/libraries | |
| parent | deafc01c21887d8b699f26f9358a7acbf765151b (diff) | |
Workaround to make G3 work with Turkish locale.
Thanks to katpatuka for providing the fix.
Diffstat (limited to 'modules/gallery/libraries')
| -rw-r--r-- | modules/gallery/libraries/I18n.php | 7 | 
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'];    } | 
