Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2, 6.4
-
None
-
-
25
-
Foundation PM Prioritized
Description
When choosing Norwegian Bokmål in the macOS preferences as the preferred language (Norwegian Nynorsk being the other alternative), the system QLocale is correctly reported as
QLocale(Norwegian Bokmal, Latin, Norway)
with language nb_NO
However it's common to provide translations for Norwegian using the no_NO language code (our own i18n example does this for example).
As a user I would expect a no_NO translation to be picked up and used, for at least nb_NO, and possibly also nn_NO.
It does not seem like QLocale has any knowledge of/concept of macro languages, which makes it hard for QTranslator to provide any fallback logic for this.
Possibly solutions would be to include the macro language in QLocale::uiLanguages(), or to have an explicit QLocale::macroLanguage() that QTranslator can use when looking for translation files.
Attachments
Issue Links
- relates to
-
QTBUG-112765 Create QLocaleSelector
- Open
-
QTBUG-97513 Teach QLocale to recognise known aliases for languages and territories
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-107781 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
439202,3 | i18n example: Use 'nb' for Norwegian translation | dev | qt/qtbase | Status: ABANDONED | +2 | 0 |