Fix locales check in lang.