AnsweredAssumed Answered

Adding localized geoprocessing widget input parameters

Question asked by khibmaesri-ca-esridist Employee on May 23, 2018
Latest reply on May 24, 2018 by rscheitlin

Just wondering if anyone has come up with a sure fire way to add localized parameter names for the geoprocessing widget? The parameter names (and tool tips) come from the config__##.json file located in the config folder. They don't pull from the nls\strings.js. I realize there's probably a few ways to solve this:  multiple config files, hacking the widget to point at strings.js (this way might be messy) and the list goes on...

 

I implemented the first method of loading a localized config file for Robert's Identify as I needed it to point at localized fields when performing a query. If the locale matches French (FR), I override the config. Right now this seems like my best path forward for geoprocessing as well.

 

\jimu.js\ConfigLoader.js

function loadWidgetManifest(widgetManager, e, portalUrl){
     function _doLoadWidgetManifest(e){
          if (e.name === "Identify"){
             console.log(dojoConfig.locale);
               if (dojoConfig.locale.indexOf("fr") >= 0) {
                   e.config = "configs/Identify/config__28FR.json";
                   console.log(e.config);
                }
          }

 

Other thoughts?

Outcomes