Changeset 1584 for trunk/gregarius/cls/l10n.php
- Timestamp:
- 09/16/06 10:57:41 (2 years ago)
- Files:
-
- 1 modified
-
trunk/gregarius/cls/l10n.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/l10n.php
r1583 r1584 34 34 var $cache; 35 35 var $locale; 36 var $isolang; 36 37 37 38 function RSSl10n() { 38 39 $this -> locale = preg_replace('#[^a-zA-Z_]#','',$this -> __detectUserLang()); 40 41 $ll=explode('_',$this -> locale); 42 $this->isloang=$ll[0].'-'.strtoupper($ll[1]); 43 39 44 if (function_exists('version_compare') && version_compare("4.3.0",PHP_VERSION, "<=") && preg_match('#([a-z]{2})_([A-Z]{2})#',$this -> locale,$m)) { 40 45 $locales=array( … … 68 73 function getLocale() { 69 74 return $this -> locale; 75 } 76 function getISOLang() { 77 return $this ->isloang; 70 78 } 71 79 /** … … 102 110 // xx -> xx_XX 103 111 $ret= $pm[1] ."_".strtoupper($pm[1]); 112 } elseif($pm[1] == 'en') { 113 // ugly: a better way would be to look up all the available locales 114 // and match against that list 115 $ret='en_US'; 104 116 } 105 117 if ($ret) {
