call i18n.get_i18n().set_locale() as early as possible and use webapp2.abort()