How can I make the "German" label into "English" for basemap gallery?

956
5
Jump to solution
11-01-2017 05:52 AM
Muqit_Zoarder
Occasional Contributor

Hello Everyone, in my appliation i am using esri basemap gallery and all the labels are in german language. I think this is happening because of our location is in Germany. But I need to show the basemap gallery map labels into English.

How I can do it?

My map.js basemap coding is as follows:

 var basemapGallery = new BasemapGallery({
            showArcGISBasemaps: true,
            map: map
        }, "basemapGallery");

        basemapGallery.on('load',function(){
            basemapGallery.remove('basemap_1');
            basemapGallery.remove('basemap_2');
            //basemapGallery.remove('basemap_3');
            basemapGallery.remove('basemap_4');
            basemapGallery.remove('basemap_5');
            //basemapGallery.remove('basemap_6');
            basemapGallery.remove('basemap_7');
            //basemapGallery.remove('basemap_8');
            //basemapGallery.remove('basemap_9');
            //basemapGallery.remove('basemap_10');
        });

        //esriConfig.defaults.map.zoomDuration = 0;
        //esriConfig.defaults.map.zoomRate = 0;

        //Add Dynamic Layers
        featureLayer = new ArcGISDynamicMapServiceLayer("https://......../MapServer", {
            opacity: 1
        });

    
        //map.addLayer(featureLayer);
        map.addLayers([baseMap,featureLayer]);

Regards

M.Zoarder

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Muqit,

  to force a locale you use this block of code in your app:

<script type="text/javascript">
  dojoConfig = {
    locale: "en",
    parseOnLoad: false
  };
</script>

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Muqit,

  Would it be OK if the whole app used English?

0 Kudos
Muqit_Zoarder
Occasional Contributor

Robert, we have two version of our app. One is in german and another is in english. We need english lables for basemap gallery for English version. Please visit our app : Dauerfeldversuche Deutschland 

Can you please suggest me how can I convert the lables in basemap gallery?

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Muqit,

  to force a locale you use this block of code in your app:

<script type="text/javascript">
  dojoConfig = {
    locale: "en",
    parseOnLoad: false
  };
</script>
Muqit_Zoarder
Occasional Contributor

In my index.php i have changed the code :

but not working !!

0 Kudos
Muqit_Zoarder
Occasional Contributor

My mistake in code, thanks now it is working.

0 Kudos