How to set widget icon depending on locale

449
0
07-04-2021 07:36 AM
Labels (1)
AlexeyGaponov
New Contributor

Hi! I'm new to WAB widget development. I'd like to add to make the widget icon shown in toolbar change depending on current locale. I try to do this via css:

html[lang="en"] .jimu-widget-demo {
  icon: url("images/icon_en.png") !important;

  background-image: url("images/icon_en.png") !important;
}

html[lang="ru"] .jimu-widget-demo {

  icon: url("images/icon_ru.png") !important;

  background-image: url("images/icon_ru.png") !important;

}

But unfortunately icon shown in toolbar doesn't change( Is it possible to do so? Or am I doing it the wrong way? Other localization works fine (I use nls for string translation and the same css tips to use different font styles depending on locale). Thanks in advance!

Tags (3)
0 Kudos
0 Replies