The code intends to trim the country, variant and any extensions from the value returned from `Locale.getDefault()`
Example: "Chinese (Traditional) - Taiwan" to "Chinese"
Pseudocode:
`zh_Hant_TW` -> `zh`
It also normalizes to fix some Android internal mapping issues due to changes in ISO 639 (Hebrew can be `iw` or `he[b]`)