def apnumber(value):
    try:
        value = int(value)
    except ValueError:
        return value
    if not 0 < value < 10:
        return value
    return (_('one'), _('two'), _('three'), _('four'), _('five'), _('six'), _('seven'), _('eight'), _('nine'))[value-1]
For numbers 1-9, returns the number spelled out. Otherwise, returns the
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/contrib/humanize/templatetags/humanize.py/apnumber