00001 <?php 00007 $ts = '20010115123456'; 00008 00009 00010 $IP = dirname( __FILE__ ) . '/../..'; 00011 require_once( "$IP/maintenance/commandLine.inc" ); 00012 00013 foreach ( glob( "$IP/languages/messages/Messages*.php" ) as $filename ) { 00014 $base = basename( $filename ); 00015 $m = array(); 00016 if ( !preg_match( '/Messages(.*)\.php$/', $base, $m ) ) { 00017 continue; 00018 } 00019 $code = str_replace( '_', '-', strtolower( $m[1] ) ); 00020 print "$code "; 00021 $lang = Language::factory( $code ); 00022 $prefs = $lang->getDatePreferences(); 00023 if ( !$prefs ) { 00024 $prefs = array( 'default' ); 00025 } 00026 print "date: "; 00027 foreach ( $prefs as $index => $pref ) { 00028 if ( $index > 0 ) { 00029 print ' | '; 00030 } 00031 print $lang->date( $ts, false, $pref ); 00032 } 00033 print "\n$code time: "; 00034 foreach ( $prefs as $index => $pref ) { 00035 if ( $index > 0 ) { 00036 print ' | '; 00037 } 00038 print $lang->time( $ts, false, $pref ); 00039 } 00040 print "\n$code both: "; 00041 foreach ( $prefs as $index => $pref ) { 00042 if ( $index > 0 ) { 00043 print ' | '; 00044 } 00045 print $lang->timeanddate( $ts, false, $pref ); 00046 } 00047 print "\n\n"; 00048 } 00049 00050