Added support for locale switching in some aspects