Implemented automatic locale discovery