Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-107781

Norwegian macro language code 'no' not picked up by QTranslator

    XMLWordPrintable

Details

    • All
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Eddy Edward Welbourne
              vestbo Tor Arne Vestbø
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes