diff options
author | Leena Miettinen <riitta-leena.miettinen@digia.com> | 2014-04-15 16:49:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-16 07:28:00 +0200 |
commit | 454ebcac45a170abdc67ac08ea04a4efb8c586ad (patch) | |
tree | f418b8c62d2c286edd2ef9aeb48fa155d208aa3b /src/corelib/kernel | |
parent | fb7da5cc8c13bbf9a134306c1d290d34373687b0 (diff) |
Doc: recommend using QLocale for loading translations
Users can choose to use different UI languages and regional settings on
their devices. QTranslator::load(const QLocale &) function uses
QLocale::uiLanguages() and not to the locale name, which refers to the
formatting of dates and numbers.
Change-Id: Iec6327dd1e91d913176499b23482d725b9d0a8aa
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 843a6edce1..94c77302dd 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -465,6 +465,12 @@ QTranslator::~QTranslator() \li \c /opt/foolib/foo.qm \li \c /opt/foolib/foo \endlist + + Usually, it is better to use the QTranslator::load(const QLocale &, + const QString &, const QString &, const QString &, const QString &) + function instead, because it uses \l{QLocale::uiLanguages()} and not simply + the locale name, which refers to the formatting of dates and numbers and not + necessarily the UI language. */ bool QTranslator::load(const QString & filename, const QString & directory, |