Multi-language for the About Widget

286
1
07-02-2019 11:56 PM
OscarDiago_Alonso
New Contributor III

Hi!

How could I show different content in the About Widget depending on the browser language?

I know how to support different languages in my own custom widgets, but I have no idea how to do it with the About Widget. Is it even possible or would it be way faster if I develop a custom About Widget?

Thanks for any help!

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Esteemed Contributor

Oscar,

   One way I have seen others handle this is to use a different config.json based on the browsers locale:

\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";
                }
          }
...