How can I change the text direction in gnome-shell back and forth between right-to-left and left-to-right?
(Mine is in left-to-right. I have tried changing the language to Chinese (using the "Region and Language" settings widget) which I believe does right-to-left. Upon logging out and back in, the shell still appeared left to right. Do I need to do something else like set a keyboard layout to cause RTL ??).
Gnome as all GTK application, its RTL switch comes from locale definition and it's tight coded. So you have to change to RTL locale/language. If that locale is not installed GUI will be flipped but text/labels/menu will fall-back to the original language (English in most cases) with warning message:
As I know Chinese is direction independent, I suppose it is configured as LTR. So it is better to look pure RTL locales like Arabic, Hebrew, Persian ...
To change setting for Unity or Gnome Sessions/Desktop
To change global settings
/etc/default/locale
, Example (ar_DZ, Arabic_Algeria):Need to logout
To change only user setting
~/.pam_environment
Need to logout
Another way, If you want to flip GUI or switch locale/language for just one application:
Run it with
LANG=ar_DZ.UTF-8
orLANGUAGE=ar_DZ.UTF-8
, try both of them not all application use sameenv
variable:Qt applications have a separated RTL switch
-reverse
which could be used without language change. Example:Now, If your language is not English and you want to use RTL flipped interface with it. There is a trick, you may test it:
Generate new locale as variation of an RTL language, example:
Copy your language translation (of
gettext
) files to new locale folder. As example French.Not all application put their locales in
/usr/local/share/locale/
. If you face such case, you may look where all locale files:References: