Changeset 1570 for trunk/gregarius/cls
- Timestamp:
- 09/10/06 12:09:42 (2 years ago)
- Files:
-
- 1 modified
-
trunk/gregarius/cls/l10n.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/l10n.php
r1569 r1570 33 33 var $l10n; 34 34 var $cache; 35 var $locale; 35 36 36 37 function RSSl10n($locale) { 37 38 $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 $this -> locale = $locale; 40 if (function_exists('version_compare') && version_compare("4.3.0",PHP_VERSION, "<=") && preg_match('#([a-z]{2})_([A-Z]{2})#',$locale,$m)) { 39 41 $locales=array( 40 42 $m[0].'UTF-8', … … 49 51 setlocale(LC_ALL, $locale); 50 52 } 51 53 52 54 $path = GREGARIUS_HOME .'/intl/' . $locale . '/LC_MESSAGES/messages.mo'; 53 55 $streamer = new FileReader($path); … … 63 65 $this -> cache[$msg] = $ret; 64 66 return $ret; 65 66 67 } 67 68 }
