Save and restore the current locale setting