def get_translation(self): lang = get_language() queryset = get_translation_queryset(self).filter(language=lang) if queryset: return queryset[0] # If there's no translation available in the current language queryset = get_translation_queryset(self) if queryset: return queryset[0] # If there's no translation available at all return None
def title(self, obj): return get_translation_queryset(obj)[0].title
def author(self, obj): return get_translation_queryset(obj)[0].author