Added hasLocale() method.