The current implementation of currentAppleLanguage() takes the first two characters of the first language identifier returned by the APPLE_LANGUAGE_KEY key. However, this may not work with locales with three-lettered identifiers (e.g. fil for Filipino). So, it seemed to me that that logic was there to handle hyphenated locale identifiers (e.g. en-US). So, I suggest reading up to that hyphen is a better solution. Thoughts?
The current implementation of
currentAppleLanguage()
takes the first two characters of the first language identifier returned by theAPPLE_LANGUAGE_KEY
key. However, this may not work with locales with three-lettered identifiers (e.g.fil
for Filipino). So, it seemed to me that that logic was there to handle hyphenated locale identifiers (e.g. en-US). So, I suggest reading up to that hyphen is a better solution. Thoughts?