Show
Ignore:
Timestamp:
09/10/06 11:52:49 (2 years ago)
Author:
mbonetti
Message:

Locale selection in the admin, LC_ALL

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/admin/index.php

    r1561 r1569  
    258258    $ret = array(); 
    259259    $activeIdx = "0"; 
     260    $ret['en_US']='en_US'; 
    260261    while (false !== ($entry = $d->read())) { 
    261         if ( 
    262             $entry != "CVS" && 
    263             substr($entry,0,1) != "." 
    264         ) { 
    265             $info = getLanguageInfo($entry); 
    266             if (count($info) && array_key_exists('language',$info)) { 
    267                 $shortL=  preg_replace('|\.php.*$|','',$entry); 
    268                 $ret[$shortL] = $info['language']; 
    269             } 
    270         } 
     262        if (preg_match('#^[a-z]{2}_[A-Z]{2}$#',$entry)) { 
     263            $ret[$entry]=$entry; 
     264        }  
    271265    } 
    272266    $d->close();