addDescription( 'Dump an entire language, using the keys from English' ); $this->localisationCache = MediaWikiServices::getInstance()->getLocalisationCache(); } public function execute() { $messages = []; $localisationMessagesEn = $this->localisationCache->getItem( 'en', 'messages' ); foreach ( array_keys( $localisationMessagesEn ) as $key ) { $messages[$key] = wfMessage( $key )->text(); } $this->output( "MediaWiki " . MW_VERSION . " language file\n" ); $this->output( serialize( $messages ) ); } } $maintClass = DumpMessages::class; require_once RUN_MAINTENANCE_IF_MAIN;