Changeset 1584
- Timestamp:
- 09/16/06 10:57:41 (2 years ago)
- Location:
- trunk/gregarius
- Files:
-
- 3 modified
-
cls/l10n.php (modified) (3 diffs)
-
cls/wrappers/header.php (modified) (1 diff)
-
themes/default/web/index.php (modified) (1 diff)
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) { -
trunk/gregarius/cls/wrappers/header.php
r1561 r1584 157 157 } 158 158 159 function rss_header_doclang() { 160 return isset($GLOBALS['rssl10n']) && $GLOBALS['rssl10n']->getISOLang() ? $GLOBALS['rssl10n']->getISOLang():'en'; 161 } 159 162 ?> -
trunk/gregarius/themes/default/web/index.php
r1323 r1584 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang=" en">2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo rss_header_doclang(); ?>"> 3 3 <head> 4 4 <?php rss_main_header(); ?>
