Force RTL is an extension for Firefox and Thunderbird, which is aimed at Mozilla developers.  Force RTL tries to help minimize the number of bugs introduced in Firefox and Thunderbird in RTL mode, by giving the developers a very easy tool to test their changes to the Firefox and Thunderbird user interface in RTL mode.

Force RTL Preview

Rationale

Most languages spoken around the world are written from left to right.  There are, however, some languages written from right to left, including, but not limited to, Hebrew, Arabic and Persian.  These languages require special handling in computer software.

The Mozilla project has been supporting RTL languages for quite some time.  However, if you grab the latest version of an RTL build of Firefox, for example, you will note that there are a lot of problems with the user interface which don't exist in left-to-right versions of the browser.  A lot of these bugs are already known.  Because most of the developers working on these project do not have an RTL version of the browser (and can't use one of the RTL localizations, because they don't know those languages), they are often likely to introduce new RTL bugs, which don't show up in LTR mode (because that's the mode that the developer has tested his code under).  Therefore, a simple method is needed to change the direction of the user interface to RTL, without changing the language of the interface.  Force RTL attempts to solve this problem.

How to Get It?

Installing Force RTL is as simple as installing any other Firefox or Thunderbird extension.  Simply, view the Force RTL extension's page on AMO, and grab the latest version from there.  The latest version currently is 2.1.

Please note that Find In Numbers is currently in sandbox, and is therefore shown as experimental.  To install it, you need to register an account on AMO if you don't already have one, and log in using that account.  Your reviews will help get this extension public, and are appreciated!

How It Works

Firefox 2.0.0.x and Thunderbird 2.0.0.x

When you install this extension in Firefox 2.0.0.x or Thunderbird 2.0.0.x, the interface of the application switches to right-to-left as soon as you restart the application with this extension enabled.  In order to switch back to the left-to-right mode, you should disable this extension and restart the application.

Firefox 3.0.x and Thunderbird 3.0.x and later

When you install this extension in Firefox 3.0.x (including Firefox 3 alpha and beta versions starting from Alpha 1, and higher versions) or Thunderbird 3 Alpha 1 (and higher versions), the direction of the interface can be adjusted dynamically at runtime.  To test it, you can use the “Force RTL Direction” menu item from the Tools menu.  This menu item allows you to switch between RTL and LTR modes dynamically.  For example, if you want to test your patch in RTL mode, you can simply switch to the RTL mode, test your chages, and switch back to the LTR mode when you're done.  No restart is required.  The selected direction will be saved across sessions, so if you choose the RTL direction and close the application, the next time you open it, it will start in RTL mode by default.  The RTL mode settings affect both existing windows, and the ones you open later on.

Known Problems

Corrupted Menu Layout

During testing this extension, we found out that if you change the direction via the Tools menu, the layout of this menu itself will be corrupted after the switch.  Switching the mode back to what it was does not solve this issue.  Kai Liu (the original creator of this extension) found out that this is a bug in Gecko, and is not specific to our extension.  He filed a bug for this issue, and also wrote a simple test case demonstrating the problem.  Possible workarounds for this issue are opening a new window or restarting the application.  Of course, if what you're working on does not include menus, this problem does not affect your work in any way.

RTL Builds Not Supported

Currently (as of version 2.1), this extension does not support RTL versions of Firefox and Thunderbird.  Support for those versions is something I can add if users request it, but I'm not sure if it's helpful, since if you're running an RTL version of the application, you're not affected by the problem described above.

Acknowledgments

Thanks to Kai Liu, for his great work on fixing RTL related bugs, and this extension.  The original idea of this extension belongs to him, and he created the initial version of this extension, and helped me with creating the newer version which allows dynamic switching of the direction.