I am developing an Android application for the global market, which will (hopefully!) be installed by users speaking different languages.
Since I want to adjust my interface language to the device's language, I need to acquire that language name in a convenient, standard format - preferably, ISO 639-2 3-letter format in which Hebrew is heb
, English is eng
and Spanish is spa
.
How can I get the Android interface language in ISO 639-2 3-letter format?
You can use this code snippet:
I use the 2 chars variant, but I cut that part out, to leave you the 3 chars variant, as required.