Select to view content in your preferred language

Tooltips not changing

878
4
01-22-2014 06:34 AM
AleydisG__Pere
Regular Contributor
I've tried setting esri.bundle.toolbars.draw.addPoint and esri.bundle.toolbars.draw.freehand but my drawing tools keep showing the default tooltip.
When I type console.dir(esri.bundle) in my browser's console they actually have changed to the strings I set though.
Any idea of what is going on?
0 Kudos
4 Replies
JamieSimko
Regular Contributor
Are you setting the tooltips before activating the drawTool?

A code snippet where you setup the map and draw tool would help answer your question if setting the tooltips and then calling drawTool.activate() doesn't work.
0 Kudos
JonathanUihlein
Esri Regular Contributor
Agree with Jsim. His answer is correct.

Using this sample:
https://developers.arcgis.com/en/javascript/jssamples/graphics_add.html

        function initToolbar() {
          tb = new Draw(map);
          
          esri.bundle.toolbars.draw.freehand = "new label";
          
          tb.on("draw-end", addGraphic);

          // event delegation so a click handler is not
          // needed for each individual button
          on(dom.byId("info"), "click", function(evt) {
            if ( evt.target.id === "info" ) {
              return;
            }
            var tool = evt.target.id.toLowerCase();
            map.disableMapNavigation();
            tb.activate(tool);
          });
        }


jsfiddle:

http://jsfiddle.net/7KjX8/
0 Kudos
AleydisG__Pere
Regular Contributor
The source of the problem is the locate I'm using (ca_ES). The ArcGIs JS API doesn't support the catalan language. When commenting out the locale setting in dojoConfig it works.

Acording to the documentation I should create a new resource bundle file for my language.
Is there any sample file to start with? I'm checking the online documentation. Hope I find something.

BTW, checking that jsfiddle helped me realize what was the problem. Thanks!
0 Kudos
JonathanUihlein
Esri Regular Contributor
Great! Glad to help 😃

Feel free to make another thread if you have any issues with internationalization.

Lastly, please mark this thread as 'answered' if you are completely satisfied with the responses received thus far.
0 Kudos