properly handle locales with country codes