r47178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47177‎ | r47178 | r47179 >
Date:14:10, 12 February 2009
Author:yaron
Status:deferred
Tags:
Comment:
Added Google internationalization of displayed map
Modified paths:
  • /trunk/extensions/SemanticGoogleMaps/SGM_QueryPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticGoogleMaps/SGM_QueryPrinter.php
@@ -107,13 +107,14 @@
108108 } else {
109109 $control_class = 'GLargeMapControl';
110110 }
111 - global $wgJsMimeType, $wgGoogleMapsKey, $wgGoogleMapsOnThisPage;
 111+ global $wgJsMimeType, $wgGoogleMapsKey, $wgGoogleMapsOnThisPage;
 112+ global $wgLang;
112113
113 - if (!$wgGoogleMapsOnThisPage) {$wgGoogleMapsOnThisPage = 0;}
114 - $wgGoogleMapsOnThisPage++;
 114+ if (!$wgGoogleMapsOnThisPage) {$wgGoogleMapsOnThisPage = 0;}
 115+ $wgGoogleMapsOnThisPage++;
115116
116 - $map_text = <<<END
117 -<script src="http://maps.google.com/maps?file=api&v=2&key=$wgGoogleMapsKey" type="$wgJsMimeType"></script>
 117+ $map_text = <<<END
 118+<script src="http://maps.google.com/maps?file=api&v=2&key=$wgGoogleMapsKey&hl={$wgLang->getCode()}" type="$wgJsMimeType"></script>
118119 <script type="text/javascript">
119120 function createMarker(point, title, label, icon) {
120121 if (icon!='') {

Status & tagging log