[Qt-interest] Qt::LayoutDirection and language
Diego Iastrubni
diegoiast at gmail.com
Thu May 13 08:53:04 CEST 2010
This is exaclty what qt_detectRTLLanguage gives you. The direction of the
language loaded into the translation.
Basically, all it does it check for this (which is set for Arabic and Hebrew
translation already):
QApplication::tr("QT_LAYOUT_DIRECTION") == QLatin1String("RTL"))
However, If you want to do this for a non loadede language, IMHO, loading
the translation for that language is an overkill, and your hack is "good
enough".
On Thu, May 13, 2010 at 12:12 AM, Robert Hairgrove <evorgriahr at hispeed.ch>wrote:
>
> Diego Iastrubni wrote:
> > On Wed, May 12, 2010 at 7:05 PM, Robert Hairgrove <evorgriahr at hispeed.ch
> > <mailto:evorgriahr at hispeed.ch>> wrote:
> >
> > There is no interface, however (AFAICT) to query the locale or the
> > language to get the reading direction at runtime.
> >
> >
> > Sure there is, If you don't understand this from the followin lines,
> > please re-ask and I will give you a better hint ;-)
> >
> [snip]
>
> Thanks, but I don't want to change this for the entire application, just
> for one or two widgets which display a list in a different language than
> the application is running in ... I need to know which direction it is
> depending on the language chosen (i.e., I cannot depend on external
> translation files for this).
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100513/e52a13af/attachment.html
More information about the Qt-interest-old
mailing list