Bug 165406

Summary: Bidi text: no method for right- and left- aligning text in standard KDE text boxen
Product: [I don't know] kde Reporter: Dotan Cohen <kde-2011.08>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: elcuco
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dotan Cohen 2008-06-30 12:05:05 UTC
Version:            (using KDE 4.0.83)

Users of Right-To-Left languages such as Arabic, Hebrew, and Farsi often need to either right- or left- align the text in text fields. Currently, not all KDE applications support the ability to switch the text direction. Most KDE applications simply left align everything (kate, for instance). Others (such as Basket) right- or left- align based on the first letter of text fields. Still other apps (Kaddressbook, for instance) right- or left- align each line of text separately  based upon the first letter of that line.

Mozilla applications (Firefox, Thunderbird) allow the user to select RTL or LTR with a keyboard shortcut (Ctrl-Alt-X). KDE needs a similar facility for for switching text alignment, which would be consistent across KDE apps. Implementing Ctrl-Alt-X or another shortcut (preferably configurable) is necessary.

Note that this is not related to word processor align function. RTL and LTR display as referenced in this bug refers to current display only. The RTL or LTR setting need not be saved.

Thanks.
Comment 1 Diego Iastrubni 2008-06-30 15:27:47 UTC
This issue (IMHO) speaks about the automatic text direction detection we had in Qt3 and lost in Qt4. It should be applied to KLineEdit KTextEdit. I tried to modify a working copy of mine a few months ago, and found out that I needed to access some pivate members of QTextEdit or something. I will try and find out what can be done for KDE 4.2.

Meanwhile, IMHO, we can enable the enhanced support for RTL languages by default in KApplication (this can be enabled trough qtconfig, but not all distros will publish this application). What do you think?
Comment 2 Dotan Cohen 2008-06-30 15:48:24 UTC
Thanks, Diego. I googled kapplication, but I am still unclear as to what it is. If you can RTFM me with a link to more info about kapplication I'd appreciate it. Will this enable proper directionality in all (or some) KDE apps? And even if a particular distro does not include it, can it be added afterwards without recompiling KDE?
Comment 3 Diego Iastrubni 2008-08-13 08:15:42 UTC
Ahalan Dotan

Please start qtconfig, go to the "Interfacr tab", check "Enhanced support for languages written right-to-left", and restart KDE. Now in QTextEdit and QLineEdit based widgets you will be able to change the paragraphs direction.

BTW, this is not a duplicate of http://bugs.kde.org/show_bug.cgi?id=156093  -> this one talks about different wigets ;-)
Comment 4 Dotan Cohen 2008-08-16 13:02:01 UTC
> Now in QTextEdit and QLineEdit based widgets you will be
> able to change the paragraphs direction. 

Thanks, but how?!? What is the keyboard shortcut?
Comment 5 Diego Iastrubni 2008-10-02 17:02:33 UTC
(oops... I forgot to reply...)

control+shift on the right, or left side of the keyword. Just like in Windows.
Comment 6 Dotan Cohen 2009-04-27 22:15:03 UTC
With the exception of Kate, this issue seems to be resolved in all KDE apps now. If I come across any exceptions, I will file them as separate bug reports.

Thanks!