Tweet
|
Languages such as Arabic, Farsi, Urdu, Hebrew, and Yiddish are called 'bidirectional
language' because text is written from right to left,
while embedded text in 'Western' languages is written from left to right.
To support these languages completely, GUI needs change the screen orientation
(menu/tool bar direction, string alignment ...etc)
from 'left-to-right' to 'right-to-left' when user's or OS language gets specified
bidirectional one.
The following are sample copdes of setting GUI orientation 'right-to-left' in each programming
case.
SetProcessDefaultLayout(LAYOUT_RTL)
ComponentOrientation o = ComponentOrientation.getOrientation(Locale.getDefault()); or = ComponentOrientation.RIGHT_TO_LEFT; setComponentOrientation(o); or applyComponentOrientation(o);
RightToLeft = RightToLeft.Yes; RightToLeftLayout = true; ... MessageBox.Show(..., MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading);
BOOL CXXXX::PreCreateWindow(CREATESTRUCT& cs) { ... cs.dwExStyle |= WS_EX_LAYOUTRTL; return TRUE; }
Go to Internationalization Programming Top