Changeset 2433
- Timestamp:
- 09/02/08 16:19:23 (3 months ago)
- Location:
- trunk/htdocs
- Files:
-
- 3 modified
-
index.php (modified) (1 diff)
-
system/classes/adminhandler.php (modified) (1 diff)
-
system/classes/locale.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/index.php
r2396 r2433 170 170 } 171 171 172 if ( @ Options::get( 'system_locale' ) ) { 173 Locale::set_system_locale( Options::get( 'system_locale' ) ); 174 } 175 172 176 // Verify if the database has to be upgraded. 173 177 if ( Version::requires_upgrade() ) { -
trunk/htdocs/system/classes/adminhandler.php
r2432 r2433 210 210 'selectarray' => array_merge( array( '' => 'default' ), array_combine( Locale::list_all(), Locale::list_all() ) ), 211 211 'helptext' => 'International language code', 212 ) 212 ), 213 'system_locale' => array( 214 'label' => _t('System Locale'), 215 'type' => 'text', 216 'helptext' => 'The appropriate locale code for your server', 217 ), 213 218 ); 214 219 -
trunk/htdocs/system/classes/locale.php
r2427 r2433 28 28 self::$locale= strtolower( $locale ); 29 29 self::$uselocale= self::load_domain( 'habari' ); 30 } 31 32 /** 33 * Set system locale. 34 * 35 * The problem is that every platform has its own way to designate a locale, 36 * so for German you could have 'de', 'de_DE', 'de_DE.UTF-8', 'de_DE.UTF-8@euro' 37 * (Linux) or 'DEU' (Windows), etc. 38 * 39 * @todo: This setting should probably be stored in the language files. 40 * 41 * @param string... $locale The locale(s) to set. They will be tried in order. 42 * @return string the locale that was picked, or FALSE if an error occurred 43 */ 44 public static function set_system_locale() 45 { 46 if ( func_num_args() == 0 ) return; 47 $args= func_get_args(); 48 array_unshift( $args, LC_ALL ); 49 50 return call_user_func_array( 'setlocale', $args ); 30 51 } 31 52
