Make current_locale expression a generic function