ToolBox.php

Go to the documentation of this file.
00001 <?php
00015 class TranslateToolbox {
00025     static function toolboxAllTranslations( &$quickTemplate ) {
00026         $title = $quickTemplate->getSkin()->getTitle();
00027         $handle = new MessageHandle( $title );
00028         if ( $handle->isValid() ) {
00029             $message = $title->getNsText() . ':' . $handle->getKey();
00030             $desc = wfMessage( 'translate-sidebar-alltrans' )->text();
00031             $url = htmlspecialchars( SpecialPage::getTitleFor( 'Translations' )
00032                 ->getLocalURL( array ('message' => $message ) ) );
00033 
00034             // Add the actual toolbox entry.
00035             // Add newlines and tabs for nicer HTML output.
00036             echo "\n\t\t\t\t<li id=\"t-alltrans\"><a href=\"$url\">$desc</a></li>\n";
00037         }
00038 
00039         return true;
00040     }
00041 }
Generated on Tue Oct 29 00:00:26 2013 for MediaWiki Translate Extension by  doxygen 1.6.3