Changeset 1571
- Timestamp:
- 09/10/06 14:15:59 (2 years ago)
- Location:
- trunk/gregarius
- Files:
-
- 12 added
- 3 modified
-
admin/config.php (modified) (2 diffs)
-
admin/index.php (modified) (3 diffs)
-
intl/cn_ZH/langinfo.txt (added)
-
intl/de_DE/langinfo.txt (added)
-
intl/dk_DK/langinfo.txt (added)
-
intl/es_ES/langinfo.txt (added)
-
intl/fr_FR/langinfo.txt (added)
-
intl/he_IL/langinfo.txt (added)
-
intl/it_IT/langinfo.txt (added)
-
intl/ja_JP/langinfo.txt (added)
-
intl/pt_BR/langinfo.txt (added)
-
intl/pt_PT/langinfo.txt (added)
-
intl/ru_RU/langinfo.txt (added)
-
intl/sv_SV/langinfo.txt (added)
-
schema.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/admin/config.php
r1569 r1571 106 106 case 'rss.output.lang': 107 107 $arr = getLanguages(); 108 echo $arr[getConfig('rss.output.lang')]; 108 if (isset($arr[getConfig('rss.output.lang')]['language'])) { 109 echo $arr[getConfig('rss.output.lang')]['language']; 110 } else { 111 echo getConfig('rss.output.lang'); 112 } 109 113 break; 110 114 case 'rss.config.tzoffset': … … 441 445 $value = ""; 442 446 $langs = getLanguages(); 443 foreach ($langs as $code => $name) { 447 foreach ($langs as $code => $info) { 448 if (isset($info['language'])) { 449 $l=$info['language']; 450 } else { 451 $l=$code; 452 } 444 453 echo "<option value=\"$code\""; 445 454 if ($code == $active_lang) { 446 455 echo " selected=\"selected\""; 447 456 } 448 echo "> ".$langs[$code]."</option>\n";457 echo ">$l</option>\n"; 449 458 } 450 459 echo "</select>\n"; -
trunk/gregarius/admin/index.php
r1569 r1571 258 258 $ret = array(); 259 259 $activeIdx = "0"; 260 $ret['en_US']='en_US'; 260 $ret['en_US']=array( 261 'language'=>'English', 262 'windows-locale'=>'english' 263 ); 261 264 while (false !== ($entry = $d->read())) { 262 265 if (preg_match('#^[a-z]{2}_[A-Z]{2}$#',$entry)) { 263 $ret[$entry]= $entry;266 $ret[$entry]=getLanguageInfo($entry); 264 267 } 265 268 } … … 270 273 271 274 272 function getLanguageInfo($ file) {275 function getLanguageInfo($dir) { 273 276 $info = array(); 274 $path = "../intl/$ file";277 $path = "../intl/$dir/langinfo.txt"; 275 278 if (file_exists($path)) { 276 279 $f = @fopen($path,'r'); … … 283 286 } 284 287 285 if ($contents && preg_match_all("/ \/\/\/\s?([^:]+):(.*)/",$contents,$matches,PREG_SET_ORDER)) {288 if ($contents && preg_match_all("/([^:]+):(.*)/",$contents,$matches,PREG_SET_ORDER)) { 286 289 foreach($matches as $match) { 287 290 $key = trim(strtolower($match[1])); 288 291 $val = trim($match[2]); 289 if ($key == 'version') {290 $val=preg_replace('/[^0-9\.]+/','',$val);291 }292 293 292 $info[$key] = $val; 294 293 } -
trunk/gregarius/schema.php
r1546 r1571 447 447 "rss.output.usepermalinks" => array("true","true","boolean","Display a permalink icon and allow linking a given item directly.",NULL), 448 448 "rss.config.markreadonupdate"=> array("false","false","boolean","Mark all old unread feeds as read when updating if new unread feeds are found.",NULL), 449 "rss.output.lang" => array("en ,es,fr,dk,it,pt_BR,se,0","en,es,fr,dk,it,pt_BR,se,0","enum","Language pack to use.",NULL),449 "rss.output.lang" => array("en_US,cn_ZH,de_DE,dk_DK,es_ES,fr_FR,he_IL,it_IT,ja_JP,pt_BR,pt_PT,ru_RU,sv_SV,0","en_US,cn_ZH,de_DE,dk_DK,es_ES,fr_FR,he_IL,it_IT,ja_JP,pt_BR,pt_PT,ru_RU,sv_SV,0","enum","Language pack to use.",NULL), 450 450 "rss.config.absoluteordering"=> array("true","true","boolean","Allow feeds and folders to be ordered by their order in the admin section. If this option is set to false, channels and folders will be organized alphabetically by their titles.",NULL), 451 451 "rss.config.robotsmeta" => array("noindex,follow","noindex,follow","string","How should spiders crawl us? (see http://www.robotstxt.org/wc/meta-user.html for more info).",NULL),
