import locale


def money(amount, symbol=True):
    """ Return a properly formatted currency string including symbol """

    try:
        return locale.currency(float(amount), symbol, grouping=True)
    except ValueError:
        pass

    return ''