#NEWLINE# def get_value( self , context , obj , field_name ) : #NEWLINE# #INDENT# '\n        gets the translated value of field name. If `FALLBACK`evaluates to `True` and the field\n        has no translation for the current language, it tries to find a fallback value, using\n        the languages defined in `settings.LANGUAGES`.\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# language = get_language ( ) #NEWLINE# value = self . get_translated_value ( obj , field_name , language ) #NEWLINE# if value : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# if self . FALLBACK : #NEWLINE# #INDENT# for ( lang , lang_name ) in settings . LANGUAGES : #NEWLINE# #INDENT# if ( lang == language ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# value = self . get_translated_value ( obj , field_name , lang ) #NEWLINE# if value : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# untranslated = getattr ( obj , field_name ) #NEWLINE# if self . _is_truthy ( untranslated ) : #NEWLINE# #INDENT# return untranslated #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . EMPTY_VALUE #NEWLINE# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# if settings . TEMPLATE_DEBUG : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# return self . EMPTY_VALUE