from MoinMoin.Page import Page
from MoinMoin import multilang, config

def execute(pagename, request):
    """ """
    pg = Page(pagename)
    errmsg = ""

    # in wiki with single language only show page
    if not config.multilingual_dir:
        pg.send_page(request, msg = errmsg)
        return                    

    if not request.form.has_key("page"):
        errmsg = "no page given"
        pg.send_page(request, msg = errmsg)
        return
    page = request.form["page"].value
    errmsg = multilang.unset_translation(page)
        
    pg.send_page(request, msg = errmsg)
                                                            
