Changeset 1569 for trunk/gregarius/cls/l10n.php
- Timestamp:
- 09/10/06 11:52:49 (2 years ago)
- Files:
-
- 1 modified
-
trunk/gregarius/cls/l10n.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/l10n.php
r1479 r1569 35 35 36 36 function RSSl10n($locale) { 37 $locale = preg_replace('#[^a-zA-Z_]#','',$locale); 38 if (function_exists('version_compare') && version_compare("4.2.0",PHP_VERSION, "<=") && preg_match('#([a-z]{2})_([A-Z]{2})#',$locale,$m)) { 39 $locales=array( 40 $m[0].'UTF-8', 41 $m[0].'utf-8', 42 $m[0], 43 $m[1].'_'.strtoupper($m[1]), 44 $m[1], 45 $m[2] 46 ); 47 setlocale(LC_ALL, $locales); 48 } else { 49 setlocale(LC_ALL, $locale); 50 } 51 37 52 $path = GREGARIUS_HOME .'/intl/' . $locale . '/LC_MESSAGES/messages.mo'; 38 53 $streamer = new FileReader($path);
