def get_translated_fields(model, language=None):
    meta = model._meta
    if not hasattr(meta, 'translated_fields'):
        if hasattr(meta, 'translation_model'):
            meta = meta.translation_model._meta
        else:
            return
    # returns all the translatable fields, except of the default ones
    if not language:
        for name, (field, non_default) in meta.translated_fields.items():
            if non_default: 
                yield name, field
    else:
        # if language is defined return fields in the same order, like they are defined in the 
        # translation class
        for field in meta.fields:
            if field.primary_key:
                continue
            name = field.name + "_%s" % language
            field = meta.translated_fields.get(name, None)
            if field:
                yield name, field[0]
dataset/ETHPy150Open hzlf/openbroadcast/website/multilingual/admin.py/get_translated_fields/original