On 6/13/16 4:20 PM, Brent Christian wrote:
On 13/06/2016 14:43, Naoto Sato wrote:
Also, the array index "2" to assume the language length is 2 is not
correct, as there are three letter language codes. So the code should
literally look for "-" instead.
Great, thanks. I will fix that.
FYI, there will be a little more to this. Some language IDs include a
script ID: a four-character code separated from the main language
designator by a '-'. ("zh-Hans" for Simplified Chinese, for instance).
In this case, the '-' at index 2 should be left alone. See [1].
-Brent
1.
https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html