Internationalization - new locale

592
0
01-29-2014 01:47 AM
AleydisG__Pere
Occasional Contributor
As the ArcGIs JS API doesn't support the catalan language I have created a resource bundle file for it (ca_ES).

This is my app's structure:
[HTML]C:/myApp/
  index.html
  js/
    app.js
    arcgis.js
    basic.js
    nls/
      resources.js <-- resource bundle file
      ca_ES/
        resources.js <-- resource bundle file (root)[/HTML]

My nls/resources.js file is this:
define({
    root: {
      toolbars: {
        draw:{
          addPoint: "Click to add a point <br/>Click <b>ESC</b> to dismiss"
        } 
      }
    },
    "ca_ES": 1
});


And my nls/ca_ES/resources.js file is this:
define({
    toolbars: {
      draw:{
        addPoint: "Click per afegir un punt <br/>Premi <b>ESC</b> per descartar"
      } 
    }
});


In my index.html file I have this:
<script type="text/javascript">
dojoConfig= {parseOnLoad: true, locale: ca_ES, async: false, packages: [{name: "resources", location: "../../js/nls"}]
};
    
dojo.ready(function() {
  esri.bundle = dojo.i18n.getLocalization("js", "resources", this.lang);
}
</script> 


In the future I'll do this with AMD but right now I'm working with pre-AMD code, so I don't know whether it's not working because of an AMD/lecagy mistake.
Any idea of what is wrong or missing?
0 Kudos
0 Replies