00001 <?php 00017 class DocumentationAid extends TranslationAid { 00018 public function getData() { 00019 global $wgTranslateDocumentationLanguageCode, $wgContLang; 00020 if ( !$wgTranslateDocumentationLanguageCode ) { 00021 throw new TranslationHelperException( 'Message documentation is disabled' ); 00022 } 00023 00024 $page = $this->handle->getKey(); 00025 $ns = $this->handle->getTitle()->getNamespace(); 00026 00027 $info = TranslateUtils::getMessageContent( $page, $wgTranslateDocumentationLanguageCode, $ns ); 00028 00029 return array( 00030 'language' => $wgContLang->getCode(), 00031 'value' => $info, 00032 'html' => $this->context->getOutput()->parse( $info ), 00033 ); 00034 } 00035 }