def translation_getter(self, name):
stuff = self.safe_translation_getter(name, NoTranslation)<EOL>if stuff is not NoTranslation:<EOL><INDENT>return stuff<EOL><DEDENT>translation = None<EOL>result = None<EOL>translation, result = self.check_for_result(<EOL>get_language(), translation, result, name)<EOL>translation, result = self.check_for_result(<EOL>get_language()[:<NUM_LIT:2>], translation, result, name)<EOL>translation, result = self.check_for_result(<EOL>settings.LANGUAGE_CODE, translation, result, name)<EOL>if not result:<EOL><INDENT>for trans in self.translations.all():  <EOL><INDENT>translation = trans<EOL>result = getattr(translation, name, '<STR_LIT>')<EOL>if result:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>setattr(self, self._meta.translations_cache, translation)<EOL>return result<EOL>
Custom translation getter.

1. Try the current language
2. Try base language (e.g. 'en' instead of 'en-gb')
3. Try default sys language
4. Use any translation