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>
This commit is contained in:
parent
fb7da5cc8c
commit
454ebcac45
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user