MediaWiki  REL1_19
dumpMessages.php
Go to the documentation of this file.
00001 <?php
00025 require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
00026 
00027 class DumpMessages extends Maintenance {
00028         public function __construct() {
00029                 parent::__construct();
00030                 $this->mDescription = "Dump an entire language, using the keys from English";
00031         }
00032         
00033         public function execute() {
00034                 global $wgVersion;
00035 
00036                 $messages = array();
00037                 foreach ( array_keys( Language::getMessagesFor( 'en' ) ) as $key ) {
00038                         $messages[$key] = wfMsg( $key );
00039                 }
00040                 $this->output( "MediaWiki $wgVersion language file\n" );
00041                 $this->output( serialize( $messages ) );
00042         }
00043 }
00044 
00045 $maintClass = "DumpMessages";
00046 require_once( RUN_MAINTENANCE_IF_MAIN );