diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 19 | ||||
-rw-r--r-- | src/corelib/tools/qlocale.h | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index c000dc8..8f50f2e 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -3478,6 +3478,25 @@ QLocale::MeasurementSystem QLocale::measurementSystem() const } /*! + \since 4.7 + + Returns true if the language is written right to left. +*/ +bool QLocale::isWrittenRightToLeft() const +{ + Language lang = language(); + if (lang == QLocale::Arabic || + lang == QLocale::Hebrew || + lang == QLocale::Persian || + lang == QLocale::Urdu || + lang == QLocale::Syriac) + return true; + + return false; +} + + +/*! \since 4.5 Returns the localized name of the "AM" suffix for times specified using diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h index f2fd892..f8b5c55 100644 --- a/src/corelib/tools/qlocale.h +++ b/src/corelib/tools/qlocale.h @@ -666,6 +666,8 @@ public: MeasurementSystem measurementSystem() const; + bool isWrittenRightToLeft() const; + inline bool operator==(const QLocale &other) const; inline bool operator!=(const QLocale &other) const; |