Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispPoint.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | * @see MapsBaseMap::addSpecificMapHTML() |
33 | 33 | */ |
34 | 34 | public function addSpecificMapHTML() { |
35 | | - global $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage; |
| 35 | + global $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage, $wgLang; |
36 | 36 | |
37 | 37 | $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
38 | 38 | |
— | — | @@ -47,6 +47,8 @@ |
48 | 48 | wfMsg( 'maps-loading-map' ) |
49 | 49 | ); |
50 | 50 | |
| 51 | + $langCode = $wgLang->getCode(); |
| 52 | + |
51 | 53 | $this->parser->getOutput()->addHeadItem( |
52 | 54 | Html::inlineScript( <<<EOT |
53 | 55 | addOnloadHook( |
— | — | @@ -58,7 +60,8 @@ |
59 | 61 | $this->zoom, |
60 | 62 | [$layerItems], |
61 | 63 | [$this->controls], |
62 | | - [$this->markerString] |
| 64 | + [$this->markerString], |
| 65 | + '$langCode' |
63 | 66 | ); |
64 | 67 | } |
65 | 68 | ); |
Index: trunk/extensions/Maps/Services/OpenLayers/OpenLayerFunctions.js |
— | — | @@ -11,8 +11,10 @@ |
12 | 12 | * Creates and initializes an OpenLayers map. |
13 | 13 | * The resulting map is returned by the function but no further handling is required in most cases. |
14 | 14 | */ |
15 | | -function initOpenLayer(mapName, lon, lat, zoom, mapTypes, controls, marker_data){ |
| 15 | +function initOpenLayer( mapName, lon, lat, zoom, mapTypes, controls, marker_data, langCode ){ |
16 | 16 | |
| 17 | + OpenLayers.Lang.setCode( langCode ); |
| 18 | + |
17 | 19 | // Create a new OpenLayers map with without any controls on it. |
18 | 20 | var mapOptions = { |
19 | 21 | projection: new OpenLayers.Projection("EPSG:900913"), |
— | — | @@ -167,5 +169,4 @@ |
168 | 170 | 'minSize': new OpenLayers.Size(minWidth, minHeight) |
169 | 171 | } |
170 | 172 | ); |
171 | | -} |
172 | | - |
| 173 | +} |
\ No newline at end of file |
Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispMap.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | * @see MapsBaseMap::addSpecificMapHTML() |
26 | 26 | */ |
27 | 27 | public function addSpecificMapHTML() { |
28 | | - global $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage; |
| 28 | + global $egMapsOpenLayersPrefix, $egOpenLayersOnThisPage, $wgLang; |
29 | 29 | |
30 | 30 | $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers ); |
31 | 31 | |
— | — | @@ -40,6 +40,8 @@ |
41 | 41 | wfMsg( 'maps-loading-map' ) |
42 | 42 | ); |
43 | 43 | |
| 44 | + $langCode = $wgLang->getCode(); |
| 45 | + |
44 | 46 | $this->parser->getOutput()->addHeadItem( |
45 | 47 | Html::inlineScript( <<<EOT |
46 | 48 | addOnloadHook( |
— | — | @@ -51,7 +53,8 @@ |
52 | 54 | $this->zoom, |
53 | 55 | [$layerItems], |
54 | 56 | [$this->controls], |
55 | | - [] |
| 57 | + [], |
| 58 | + '$langCode' |
56 | 59 | ); |
57 | 60 | } |
58 | 61 | ); |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | echo '<b>Warning:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.'; |
35 | 35 | } |
36 | 36 | else { |
37 | | - define( 'Maps_VERSION', '0.6.4 a7' ); |
| 37 | + define( 'Maps_VERSION', '0.6.4 a8' ); |
38 | 38 | |
39 | 39 | // The different coordinate notations. |
40 | 40 | define( 'Maps_COORDS_FLOAT', 'float' ); |