Bug #683
closeddisplay of WTreeView in Right to left languages
0%
Description
Hello,
The following languages are written from right to left : Arabic, Hebrew, Mandekan, Syriac, Thaana/Thâna, Tifinar, Urdu
To support right to left languages I am doing the following :
if ( rightToLeftLanguage )
{
WApplication::instance()->styleSheet().addRule("html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img,
ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, fieldset, form, label, legend, table, caption, td, tr, li",
"direction:rtl;");
WApplication::instance()->styleSheet().addRule("html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img,
ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, fieldset, form, label, legend, table, caption, td, tr, li ",
"text-align:right;");
}
else
{
// normal case : left to write language
}
This is working for most Wt Elements : WBoxLayout , WTable, etc
But there is no way to display WTreeView correctly in these RTL languages :(
Could you take a look on this issue please ?
Best regards
Files
Updated by Wim Dumon over 13 years ago
Mohamed,
Can you tell us what it looks like now, and what it should look like if done correctly? Unfortunately, we're not fluent in any of those languages. Images would help!
Wim.
Updated by Momo LALMI over 13 years ago
- File WTreeView_English1.png WTreeView_English1.png added
- File WTreeView_English2.png WTreeView_English2.png added
- File WTreeView_Arabic1.png WTreeView_Arabic1.png added
- File WTreeView_Arabic2.png WTreeView_Arabic2.png added
Hello Wim,
Thank you very much for taking this issue into account :
So this is a resume of what a WTreeView contains in "normal" languages (left to right):
____________________________________________________________________________________
COLUMN 1 (FIXED) | COLUMN 2 | COLUMN 3 | COLUMN 4 | COLUMN 5 | COLUMN 6 | COLUMN 7 |
____________________________________________________________________________________
and the following is what should be displayed in a right to left language :
___________________________________________________________________________________
COLUMN 7 | COLUMN 6 | COLUMN 5 | COLUMN 4 | COLUMN 3 | COLUMN 2 | COLUMN 1 (FIXED |
___________________________________________________________________________________
please see attached 4 images : 2 images in english and 2 in arabic ( some columns where simply dropped with my method (applying the style sheet rules : text-align:right; direction:rtl;)
Updated by Koen Deforche over 13 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
Hey Mohamed,
I'm working on this and have progressed alot. I am now in doubt however how much of the UI needs to be reversed.
E.g. in the header row, should the location of the sort and resize handles also reverse ?
Regards,
koen
Updated by Momo LALMI over 13 years ago
thanks a lot , support for right to left languages was really missing in WT :)
the location of the sort sould be also reversed.
the resize handle of a column should be displayed at the left side of that column :)
Updated by Momo LALMI over 13 years ago
Hi Koen,
May be you can add to WApplication an additional property : languange_direction or direction fixed by default to LeftToRioght and apply the stylesheet rules whenever the direction changes.
Updated by Koen Deforche over 13 years ago
- Status changed from InProgress to Resolved
Hey, I've come a long way with the implementation, see latest git (WApplication::setLayoutDirection()).
Please let me know what is still missing ?
Updated by Momo LALMI over 13 years ago
Hi Koen,
When WTreeView has Column 1 Fixed it is displayed in a strange manner (header's text is not visible, ....etc ) :)
When column 1 is not fixed everything goes fine :)
and everything is working fine with all other elements ( layouts , WTable , ....... )
Updated by Koen Deforche over 13 years ago
Hey Mohammed,
Should be fixed now in git. I do notice some weird behaviour with offset calculations in some browsers ...
And I also noticed that Firefox 4 entirely messes up dir=RTL...
Regards,
koen
Updated by Momo LALMI over 13 years ago
Hi Koen,
Thank you very much for this great work :)
some minor changes might be required on some browsers :)
- GOOGLE CHROME : Everything is OK ( LTR languages and RTL languages )
- APPLE SAFARI : Everything is OK
- INTERNET EXPLORER 9 : if WTreeWiew has column1 fixed : the horizontal scroll bar should moved a little to the left in RTL languages
- FIREFOX : pains to show the horizontal scrollbar of WTreeView when column 1 is fixed
- OPERA 11 : like FireFox : it pains to show the horizontal scrollbar and seems to stack some columns
thanks again for supporting right to left languages :)
Updated by Koen Deforche over 13 years ago
- Status changed from Resolved to Closed