According to the Java reference, Locale.getLanguage() is supposed to return the 2-letters lowercase ISO code of the language (e.g. en), while get
Locale.getLanguage()
en
get
I don't know why this issue appears, but another standard for languages is the ISO3 code. You can call Locale.getDefault().getISO3Language() and it should return "eng" or "esp".
Locale.getDefault().getISO3Language()