Creates an HTML menu for day selection. (0..31 values).

    @param name: name of the control (i.e. name of the var you'll get)
    @param selected_day: preselect a day. Use 0 for the label 'Day'
    @param ln: language of the menu
    @return: html a string

def create_day_selectbox(name, selected_day=0, ln=None):
    """Creates an HTML menu for day selection. (0..31 values).

    @param name: name of the control (i.e. name of the var you'll get)
    @param selected_day: preselect a day. Use 0 for the label 'Day'
    @param ln: language of the menu
    @return: html a string
    """
    ln = default_ln(ln)
    _ = gettext_set_language(ln)
    out = "<select name=\"%s\">\n" % name
    for i in range(0, 32):
        out += "  <option value=\"%i\"" % i
        if (i == selected_day):
            out += " selected=\"selected\""
        if (i == 0):
            out += ">%s</option>\n" % _("Day")
        else:
            out += ">%i</option>\n" % i
    out += "</select>\n"
    return out