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

[Regr: 5.x -> 6.x] QTranslator loads zh instead of zh_TW translation

XMLWordPrintable

    • 1
    • 12f8ebf5c (dev), ee65d651a (6.9), ccffe9b8c (6.8)
    • Foundation Sprint 123

      My app has two Chinese translations: Chinese (China) and Chinese (Taiwan). Translation files are named app_zh.qm and app_zh_TW.qm accordingly.

      When I try to load Chinese (Taiwan) translation, Qt 6.x loads Chinese (China) instead. Qt 5.12.12 works fine.

      Code I use:

      QTranslator t;
      t.load(QLocale("zh_TW"), "app", "_", path);

      QTranslator::load succeeds and loads QLocale("zh") translation instead of QLocale("zh_TW").

       

        For Gerrit Dashboard: QTBUG-121418
        # Subject Branch Project Status CR V

            Eddy Edward Welbourne
            alervd Alexander Dyagilev
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes