Refactor set_locale to a one-liner