How to convert IETF BCP 47 language identifier to ISO-639-2?
问题 I am writing a server API for an iOS application. As a part of the initialization process, the app should send the phone interface language to server via an API call. The problem is that Apple uses something called IETF BCP 47 language identifier in its NSLocale preferredLanguages function. The returned values have different lengths (e.g. [aa, ab, ace, ach, ada, ady, ae, af, afa, afh, agq, ...] , and I found very few parsers that can convert this code to a proper language identifier. I would