added getLocale function