MediaWiki
REL1_22
|
00001 <?php 00026 require_once __DIR__ . '/../Maintenance.php'; 00027 00033 class DumpMessages extends Maintenance { 00034 public function __construct() { 00035 parent::__construct(); 00036 $this->mDescription = "Dump an entire language, using the keys from English"; 00037 } 00038 00039 public function execute() { 00040 global $wgVersion; 00041 00042 $messages = array(); 00043 foreach ( array_keys( Language::getMessagesFor( 'en' ) ) as $key ) { 00044 $messages[$key] = wfMessage( $key )->text(); 00045 } 00046 $this->output( "MediaWiki $wgVersion language file\n" ); 00047 $this->output( serialize( $messages ) ); 00048 } 00049 } 00050 00051 $maintClass = "DumpMessages"; 00052 require_once RUN_MAINTENANCE_IF_MAIN;