xcode – Apple makes use of non-canonical ISO 639 code for Chinese language localization in iOS/MacOS
[ad_1]
I’ve written an App which internally helps plenty of completely different languages in its UI/Strings with out altering gadget area. All was working tremendous besides Chinese language. Apple dox state they use ISO 639-1 or -2 codes.
https://developer.apple.com/documentation/basis/nslocale/1418015-isolanguagecodes
The ISO language code desk says the code for Chinese language(Simplified) is “zh” or “zh-TW” (Taiwan)
https://www.loc.gov/requirements/iso639-2/php/English_list.php
My app makes use of a number of language processing APIs which use the usual ISO codes.
Utilizing Xcode 14.01, and digging into the App Bundle, I discovered it creates lproj information with names of zh-Hans and zh-Hant if you add Chinese language localization as a substitute of zh and zh-TW. All different language localizations I checked conform to ISO.
It took just a few hours of digging to search out this difficulty, so I assumed I might point out this boobytrap to different builders.
My query: Why would not Apple use ISO persistently, or a minimum of replace their documentation?
[ad_2]