refactored tests, added setLocale / getLocale to register