For several years now I have been developing a single corporate desktop application for Eastern users. A feature of the development is the need to provide support for right-to-left orientation (RTL) in the user interface.
Recently, there was a question about at least partial migration of functionality to the web. As a development tool, the GWT platform was chosen. The choice is due to the fact that I consider Java to be the most familiar technology for myself. I also wanted to try some new modern development platform for me.
After a rather short time, it was found that the set of standard components would not be enough to duplicate an existing desktop application interface. As a result of a brief search, 2 sufficiently powerful extensions for GWT were found: SmartGWT and Ext GWT (GXT). After watching the demo of both the one and the other framework, I was confused on which of them to stop. Googling a bit, I still decided to stop at the GXT. Among the advantages, users noted that most of the components can be extended through the Java language. SmartGWT in most cases is just a wrapper over JavaScript code. I did not check it - I took the word.
It was quickly discovered that, despite the tremendous power of the GXT framework, the developers decided to bypass the support for RTL interfaces and languages with right-to-left writing. On the official forum, several topics were found in which users asked to add RTL support to the GXT. But the developers everywhere wrote that such support is not planned yet, and if it is planned, then maybe already somewhere in GXT 3.x, i.e. not very soon.
')
But the
topic of the user bentins was also found, who was not lazy and laid out his work on adding support for RTL in the GXT framework to public access. One problem: RTL support has been added for GXT version 2.1.1. At that time, version 2.2.2 was already relevant. Also, the Desktop component bentins was deprived of attention (the component that emulates the OS desktop).
Having tested a bit of the author's work, it was decided to start developing RTL support for the current GXT 2.2.2 version. Began searching and porting the changes made by the bentins. At first it was very difficult to find them. But then a very powerful utility for comparing directories and Beyond Compare files came to the rescue. With the new tool work went much faster. Not all patches worked equally well in version 2.2.2. Much work has been done on adapting and adding new patches to many components, including Desktop. The most difficult thing was to add RTL support for the TabPanel tab bar, since many calculations in the component code had to be redone.
After the main work was completed, the porting of standard themes began. It was necessary to create your own styles and also to redraw some images for RTL locales. Work is not so much difficult as routine.
Development dragged out rather slowly with long downtime and officially GXT managed to get to version 2.2.4. Fortunately, the added changes did not affect the RTL capabilities and were immediately added to the project.
Unfortunately, the project was not tested in all browsers. Testing was limited to Chrome dev build, FF 4/5, IE9. Also, not all errors were corrected (oh IE). But the resulting result can already be used as a starting point in most cases where RTL support is needed.
Following the example of bentins, I decided to put all the developments into open access to the Internet. If anyone thought of starting development on GXT, but it was stopped by the inability to use the framework for RTL interfaces, I hope the work I have done will help him. Also, if someone is ready to support the project with their corrections and best practices, I will be only too happy.
Demo:
Desktop RTLExplorer RTLSources, installation instructions