diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-29 14:59:05 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-29 15:18:09 (GMT) |
commit | 2e90e8dda26721dcab4842f9ac3eeadecfadd80f (patch) | |
tree | 5df1c2bb8ecb79c16c762705b3c43d08a868d1ab /src/corelib/kernel | |
parent | 96373c2aac8b26b00337fc74a163bb2ff468ef24 (diff) | |
download | Qt-2e90e8dda26721dcab4842f9ac3eeadecfadd80f.zip Qt-2e90e8dda26721dcab4842f9ac3eeadecfadd80f.tar.gz Qt-2e90e8dda26721dcab4842f9ac3eeadecfadd80f.tar.bz2 |
Improved documentation for new QTranslator::load() overload
Reviewed-by: trustme
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 802cf1c..fcb455f 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -595,10 +595,10 @@ static QString find_translation(const QLocale & locale, /*! \since 4.8 - Loads \a filename + \a prefix + \a locale name + \a suffix (".qm" if the \a - suffix is not specified), which may be an absolute file name or relative to - \a directory. Returns true if the translation is successfully loaded; - otherwise returns false. + Loads \a filename + \a prefix + \a \l{QLocale::uiLanguages()}{ui language + name} + \a suffix (".qm" if the \a suffix is not specified), which may be + an absolute file name or relative to \a directory. Returns true if the + translation is successfully loaded; otherwise returns false. The previous contents of this translator object are discarded. @@ -607,15 +607,16 @@ static QString find_translation(const QLocale & locale, \list 1 \o File name without \a suffix appended. - \o File name with locale part after a "_" character stripped and \a suffix. - \o File name with locale part stripped without \a suffix appended. - \o File name with locale part stripped further, etc. + \o File name with ui language part after a "_" character stripped and \a suffix. + \o File name with ui language part stripped without \a suffix appended. + \o File name with ui language part stripped further, etc. \endlist For example, an application running in the locale with the following l{QLocale::uiLanguages()}{ui languages} - "es", "fr-CA", "de" might call load(QLocale::system(), "foo", ".", "/opt/foolib", ".qm"). load() would - then try to open the first existing readable file from this list: + replace '-' (dash) with '_' (underscore) in the ui language and then try to + open the first existing readable file from this list: \list 1 \o \c /opt/foolib/foo.es.qm |