What about? (or not nice?)

    flask.request.locale = get_locale()
    flask.request.locale_html = flask.request.replace('_', '-')