QLocale: document that uiLanguages() might return multiple languages
Especially for the system locale, the list of UI languages might span multiple languages, rather than just different variations of the same language. That was not clear, and not covered by the test cases. Test case augmentation in a follow up commit. Pick-to: 6.8 6.5 Task-number: QTBUG-124898 Task-number: QTBUG-129434 Change-Id: I39dd7b35778a9ffe0bdce86b2f4c474f275f61b0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
6a785ce90c
commit
8230c7d7af
@ -4848,6 +4848,15 @@ QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats
|
||||
than dashes, to separate locale tags, pass QLocale::TagSeparator::Underscore
|
||||
as \a separator.
|
||||
|
||||
The returned list may contain entries for more than one language.
|
||||
In particular, this happens for \l{QLocale::system()}{system locale}
|
||||
when the user has configured the system to accept several languages
|
||||
for user-interface translations. In such a case, the order of entries
|
||||
for distinct languages is significant. For example, where a user has
|
||||
configured a primarily German system to also accept English and Chinese,
|
||||
in that order of preference, the returned list shall contain some
|
||||
entries for German, then some for English, and finally some for Chinese.
|
||||
|
||||
Most likely you do not need to use this function directly, but just pass the
|
||||
QLocale object to the QTranslator::load() function.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user