mohakapt / Stringz

A lightweight and powerful editor for localizing iOS, macOS, tvOS, and watchOS applications.
https://github.com/mohakapt/Stringz
GNU General Public License v3.0
972 stars 48 forks source link

Chinese Traditional (Hong Kong) (zh-Hant-HK) doesn't show up #22

Closed zhgchgli0718 closed 2 years ago

zhgchgli0718 commented 3 years ago

Hi, I have Chinese Simplified, Chinese Traditional (Taiwan), Chinese Traditional (Hong Kong) in my project, but I only see Chinese Simplified and Chinese Traditional (Taiwan) in Stringz editor. Chinese Traditional (Hong Kong) (zh-Hant-HK) doesn't show up Don't know it's a problem or just my mistake?

mohakapt commented 3 years ago

I'm not sure there is a (zh-Hant-HK) language. I think Xcode only supports the following languages: (zh-hans), (zh-hant), (zh-hk). Please tell me wheather (zh-Hant-HK) is a real supported language. I'll add it to Stringz if so.

zhgchgli0718 commented 3 years ago

Hi, it's RFC4646

language-script-region-variant-extension-privateuse

and XCode support that.

zh-Hant-hk means Zh-Hant in Hong Kong, but Hong Kong also use Hans sometimes, so another setting is Zh-Hans-hk.

Hans means Chinese Simplified. (usually use in China, sometimes in Hong Kong)

Hant means Chinese Traditional. (usually use in Taiwan and Hong Kong)

Thanks!

samuelbradshaw commented 3 years ago

I manage an app that has UI strings translated into 94 languages. Several of the languages aren't showing in Stringz. These are the languages our app supports – all are standard BCP 47 codes supported by iOS / iPadOS:

af — Afrikaans am — Amharic ar — Arabic bg — Bulgarian bi — Bislama ceb — Cebuano chk — Chuukese cs — Czech da — Danish de — German efi — Efik el — Greek en — English es — Spanish et — Estonian fa — Persian (Farsi) fat — Fante fi — Finnish fj — Fijian fr — French gil — Kiribati (Gilbertese) gn — Guarani hi — Hindi hif — Hindi (Fiji) hil — Hiligaynon hmn — Hmong hr — Croatian ht — Haitian Creole hu — Hungarian hy — Armenian id — Indonesian ig — Igbo ilo — Ilokano is — Icelandic it — Italian ja — Japanese ka — Georgian kek — Kekchi km — Cambodian (Khmer) kn — Kannada ko — Korean kos — Kosraean ln — Lingala lo — Laotian lt — Lithuanian lua — Tshiluba lv — Latvian mg — Malagasy mh — Marshallese mk — Macedonian mn — Mongolian ms — Malay mt — Maltese my — Burmese (Myanmar) ne — Nepali nl — Dutch no — Norwegian nv — Navajo pau — Palauan pl — Polish pon — Pohnpeian pt — Portuguese ro — Romanian ru — Russian rw — Kinyarwanda si — Sinhala sk — Slovak sl — Slovenian sm — Samoan sn — Shona sq — Albanian sr — Serbian st — Sotho (Southern) sv — Swedish sw — Swahili ta — Tamil te — Telugu th — Thai tl — Tagalog tn — Tswana (Setswana) to — Tongan tpi — Tok Pisin (Neomelanesian) tr — Turkish tw — Twi ty — Tahitian uk — Ukrainian ur — Urdu vi — Vietnamese xh — Xhosa yap — Yapese yo — Yoruba zh-Hans — Chinese Simplified (spoken as Mandarin) zh-Hant — Chinese Traditional (spoken as Mandarin & Cantonese) zu — Zulu

mohakapt commented 3 years ago

If you have the time please consider adding the missing languages with their names and flags and I'll merge your pull request as soon as possible. If you don't need them urgently I will add them as soon as i get some free time. Thanks

ghost commented 2 years ago

Only use a script designator in a locale ID when there is ambiguity. For example, because Traditional Chinese is the default language in Hong Kong, use zh_HK, where zh is the code for Traditional Chinese and HK is the code for the Hong Kong region. For Simplified Chinese used in Hong Kong, use zh-Hans_HK as the locale ID, where zh-Hans is the code for the Simplified Chinese script.

ref: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html#//apple_ref/doc/uid/10000171i-CH15