Index: trunk/extensions/SlippyMap/SlippyMap.hooks.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | */ |
38 | 38 | |
39 | 39 | public static function onParserFirstCallInit( ) { |
40 | | - global $wgArticle, $wgOut, $wgParser, $wgScriptPath, $wgJsMimeType, $wgStyleVersion, $wgAutoLoadMaps; |
| 40 | + global $wgArticle, $wgOut, $wgLang, $wgParser, $wgScriptPath, $wgJsMimeType, $wgStyleVersion, $wgAutoLoadMaps; |
41 | 41 | |
42 | 42 | $smh = new SlippyMapHooks(); |
43 | 43 | |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | "var wgSlippyMapCode = " . Xml::encodeJsVar( wfMsg( 'slippymap_code' ) ) . ";", |
64 | 64 | "var wgSlippyMapButtonCode = " . Xml::encodeJsVar( wfMsg( 'slippymap_button_code' ) ) . ";", |
65 | 65 | "var wgSlippyMapResetview = " . Xml::encodeJsVar( wfMsg( 'slippymap_resetview' ) ) . ";", |
| 66 | + "var wgSlippyMapLanguageCode = " . Xml::encodeJsVar( $wgLang->getCode() ) . ";", |
66 | 67 | "var autoInitMaps = {$autoload};", |
67 | 68 | "/*]]>*/</script>", |
68 | 69 | ); |
Index: trunk/extensions/SlippyMap/SlippyMap.js |
— | — | @@ -40,6 +40,8 @@ |
41 | 41 | * |
42 | 42 | */ |
43 | 43 | |
| 44 | +OpenLayers.Lang.setCode(wgSlippyMapLanguageCode); |
| 45 | + |
44 | 46 | var slippymaps = new Array(); |
45 | 47 | var mapId = 0; |
46 | 48 | var layer = null; |