diff gnv/src/main/webapp/scripts/viewport.jsp @ 980:80a5cde45d12

Added i18n support to the mapclient. gnv/trunk@1158 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 04 Jun 2010 11:45:39 +0000
parents 5779220ebb80
children cd9414538f10
line wrap: on
line diff
--- a/gnv/src/main/webapp/scripts/viewport.jsp	Fri Jun 04 08:32:29 2010 +0000
+++ b/gnv/src/main/webapp/scripts/viewport.jsp	Fri Jun 04 11:45:39 2010 +0000
@@ -1,4 +1,7 @@
+<%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
 OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url=";
+OpenLayers.Lang.setCode('<%=SessionModelFactory.getInstance().getSessionModel(request).getCurrentLocale().getLanguage() %>');
 Ext.BLANK_IMAGE_URL = "scripts/openlayers/OpenLayers-2.9/theme/default/img/blank.gif";
 
 /**
@@ -38,6 +41,8 @@
     
 
     var nav   = new OpenLayers.Control.NavigationHistory();
+    nav.previous.title = "<bean:message key="gnviewer.mapclient.controls.nav.previous.title"/>";
+    nav.next.title = "<bean:message key="gnviewer.mapclient.controls.nav.next.title"/>";
     map.addControl(nav);
 
     panel = new OpenLayers.Control.Panel();
@@ -47,19 +52,19 @@
         navigate: new OpenLayers.Control.MouseDefaults(
             {
                 displayClass: 'olControlPan',
-                title:'Verschieben der Karte'
+                title:'<bean:message key="gnviewer.mapclient.controls.navigate.title"/>'
             }
         ),
         zoombox: new OpenLayers.Control.ZoomBox(
             {
                 displayClass: 'olControlZoomBox',
-                title: 'Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen'
+                title: '<bean:message key="gnviewer.mapclient.controls.zoombox.title"/>'
             }
         ),
         info : new OpenLayers.Control.WMSGetFeatureInfo({
             displayClass: "olControlFeatureInfo",
             url: 'http://fluggs.wupperverband.de/wmsconnector/com.esri.wms.Esrimap/WV_WMS', 
-            title: 'Identify features by clicking',
+            title: '<bean:message key="gnviewer.mapclient.controls.info.title"/>',
             queryVisible: true,
             eventListeners: {
                 getfeatureinfo: function(event) {
@@ -115,19 +120,19 @@
         store: store,
         cm: new Ext.grid.ColumnModel([
         {
-            header: 'Name',
+            header: '<bean:message key="gnviewer.mapclient.wms.load.grid.name"/>',
             dataIndex: 'name',
             sortable: true
         },
         {
             id: 'title',
-            header: 'Title',
+            header: '<bean:message key="gnviewer.mapclient.wms.load.grid.title"/>',
             dataIndex: 'title',
             sortable: true
         }]),
         renderTo: 'capgrid',
         bbar: [{
-            text: 'Add Layer',
+            text: '<bean:message key="gnviewer.mapclient.wms.load.addlayer"/>',
             handler: addLayer
         }]
     });
@@ -135,7 +140,7 @@
         id: 'wmspanel',
         border: true,
         region: 'east',
-        title: 'WMS Capabilities',
+        title: '<bean:message key="gnviewer.mapclient.wms.load.title"/>',
         collapsible: false,
         split: false,
         contentEl: 'cap',
@@ -153,8 +158,8 @@
         id: 'capbutton',
         region: 'west',
         handler: updateCapabilities,
-        text: 'Lade',
-        tooltip: 'Lade GetCapabilities Dokument',
+        text: '<bean:message key="gnviewer.mapclient.wms.load.bt.text"/>',
+        tooltip: '<bean:message key="gnviewer.mapclient.wms.load.bt.tooltip"/>',
         renderTo: 'urlbutton'
     });
 
@@ -169,7 +174,7 @@
         border: true,
         enableDD: true,
         region: "east",
-        title: "LayerTree",
+        title: "<bean:message key="gnviewer.mapclient.layercontrol"/>",
         width: 200,
         split: true,
         collapsible: false,
@@ -182,9 +187,11 @@
             nodeType: "async",
             children: [{
                 nodeType: "gx_baselayercontainer",
+                text: "<bean:message key="gnviewer.mapclient.layercontrol.baselayer"/>",
                 expanded: true
             }, {
                 nodeType: "gx_overlaylayercontainer",
+                text: "<bean:message key="gnviewer.mapclient.layercontrol.overlay"/>",
                 expanded: true,
                 loader: {
                     filter: function(record) {
@@ -206,7 +213,7 @@
         id: 'legendpanel',
         dynamic: true,
         border: true,
-        title: 'Legende',
+        title: '<bean:message key="gnviewer.mapclient.legend"/>',
         collapsible: false,
         split: false,
         defaults: {
@@ -216,8 +223,7 @@
         bodyStyle: 'padding:5px',
         width: 250,
         autoScroll: true,
-        region: 'east'
-        //layerStore: mapPanel.layers
+        region: 'east',
     }); 
 
 
@@ -252,8 +258,7 @@
     new Ext.Panel({
         renderTo: "mapcontainer",
         layout: "border",
-        width: 700,
-        height: 420,
+        height: 400,
         items: [mapPanel, mylegend]
     });
 

http://dive4elements.wald.intevation.org