Add "title" to the opensearch link to allow automatic adding of the search engine...
[lhc/web/wiklou.git] / opensearch_desc.php
index 25649d6..59d61ee 100644 (file)
@@ -5,8 +5,10 @@
  */
 
 require_once( dirname(__FILE__) . '/includes/WebStart.php' );
-$shortName = htmlspecialchars( mb_substr( $wgSitename, 0, 16 ) );
-$siteName = htmlspecialchars( $wgSitename );
+require_once( dirname(__FILE__) . '/languages/Names.php' );
+$fullName = "$wgSitename ({$wgLanguageNames[$wgLanguageCode]})";
+$shortName = htmlspecialchars( mb_substr( $fullName, 0, 24 ) );
+$siteName = htmlspecialchars( $fullName );
 
 if ( !preg_match( '/^https?:/', $wgFavicon ) ) {
        $favicon = htmlspecialchars( $wgServer . $wgFavicon );
@@ -35,4 +37,5 @@ echo <<<EOT
 </OpenSearchDescription>
 EOT;
 
+
 ?>