added getlocale function to locale module