0

I try to apply support for RTL interfaces(locales) in the options window of an extension for firefox. So far, i have tried the following, without success:

In my options.xul (simplified code):

<hbox>
  <image id="myImage"/><!-- or image class="myImage" -->
</hbox>

In my css (simplified code):

#myImage:-moz-locale-dir(ltr) { /* or .myImage:-moz-locale-dir(ltr) */
  list-style-image: url(chrome://path/image1.png);
}
#myImage:-moz-locale-dir(rtl) { /* or .myImage:-moz-locale-dir(rtl) */
  list-style-image: url(chrome://path/image2.png);
}

My interface loads always the image1. For my tests on RTL direction, i have installed some real RTL locales, like Hebrew and the "Force RTL" extension. Any idea why the above does not work? In RTL mode, if i remove the first css entry, the pseudoclass -moz-locale-dir(rtl) does not match, resulting in no image..

Paebbels
  • 15,573
  • 13
  • 70
  • 139
cicada
  • 13
  • 2
  • 4
  • [MDN says](https://developer.mozilla.org/en/docs/Web/CSS/:-moz-locale-dir(rtl)), _“`:-moz-locale-dir(rtl)` matches an element if the user interface is being displayed right-to-left. This is determined by the preference `intl.uidirection.locale` (where locale is the current locale) being set to "rtl".”_ – have you checked if that’s the case, resp. tried to set it to that value yourself? – CBroe Feb 22 '15 at 03:17
  • Hi, thanks for your answer. There is no need to change manually the pref "intl.uidirection.locale", because it is set to correct value for each locale i have installed. Also, i didn't mention that, in RTL mode, my options interface is "mirrored" correctly. It contains also some other elements, like check boxes, buttons, labels etc., which are "mirrored" too, except this image, which in both LTR & RTL modes is always "image1", as i describe in my post. – cicada Feb 22 '15 at 04:26

0 Answers0