From 98ec373f8c83a4f2d3c4afedfc74f58adb0554c0 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 13 Apr 2010 18:40:07 +0000 Subject: [PATCH] Support Right to left languages --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 9d73589f3..50ac3c67b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -231,6 +231,14 @@ int main(int argc, char *argv[]){ qDebug("%s locale unrecognized, using default (en_GB).", qPrintable(locale)); } app->installTranslator(&translator); +#ifndef DISABLE_GUI + if(locale.startsWith("ar")) { + qDebug("Right to Left mode"); + app->setLayoutDirection(Qt::RightToLeft); + } else { + app->setLayoutDirection(Qt::LeftToRight); + } +#endif app->setApplicationName(QString::fromUtf8("qBittorrent")); // Check for executable parameters