summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/kernel/qtranslator.cpp17
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