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

better to construct QLocale("zh-Hant") to zh_TW instead of zh_HK

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 5.0.0 RC 1
    • 4.8.3, 5.0.0 Beta 2
    • Core: Locales (i18n)
    • None
    • Mac 10.8.2
    • fe8962d3a506a850878401309f81247c80f3d203

      On Mac,

      the return values of QLocale::uiLanguages() normally like:
      ("en", "zh-Hans", "zh-Hant", "nb", "ja", "fr", "de", "es", "it", "pt", "pt-PT", "nl", "sv", "da", "fi", "ru", "pl", "ko", "ar", "cs", "hu", "tr", "th", "ca", "hr", "el", "he", "ro", "sk", "uk")

      and obviously "zh-Hans", "zh-Hant" are "zh_CN", "zh_TW" in Qt world. and they can't be used to construct a QLocale.

      Test code:

      QLocale cl1("zh-Hans");
      qDebug() << cl1.name();
      QLocale cl2("zh-Hant");
      qDebug() << cl2.name();
      

      return value:

      "zh_CN" 
      "zh_HK"
      

      it should be following normally:

      "zh_CN" 
      "zh_TW"
      

      I mean normally the default locale for Traditional Chinese should be zh_TW(Taiwan), they have more users than zh_HK(Hong Kong).

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

            ritt.ks Konstantin Ritt
            liaqi Liang Qi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes