Fix the UI language-setting breakage.

UI code was looking for exact language matches without considering country.
If no exact match is found, then the country code is stripped off and the
base language code is checked for instead.
Merge remote-tracking branch 'upstream/master' into refactor/console