code: def get_localized_field_name(context, field):
      
      attrs = [
               translation.get_language(), 
               translation.get_language()[:2], 
               settings.LANGUAGE_CODE
              ]
              
      def predicate(x):
          field_name = get_real_fieldname(field, x)
          if hasattr(context, field_name):
              return field_name
          return None
  
      return first_match(predicate, attrs)
docs: Get the name of the localized field