Fix for issue 568: Not possible to set custom language whose locale
consists of language AND country (e.g. es-AR, zh_CN)