def l10n_float(string):
    """Takes a country specfic decimal value as string and returns a float.
    """

    # TODO: Implement a proper transformation with babel or similar
    if settings.LANGUAGE_CODE == "de":
        string = string.replace(",", ".")

    try:
        return float(string)
    except __HOLE__:
        return 0.0
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/utils.py/l10n_float