(self, domain_obj, message_dict, preferred_language_code)
return result
Attempt to get translated content. If content is not available in the user's preferred language,
        attempt to fall back to other languages, as allowed by domain setting sms_language_fallback.

        By default, try all possible fallbacks before giving up (same as LANGUAGE_FALLBACK_UNTRANSLATED).

        :param domain_obj: the domain object
        :param message_dict: a dictionary of {language code: message}
        :param preferred_language_code: the language code of the user's preferred language
Attempt to get translated content. If content is not available in the user's preferred language,
        attempt to fall back to other languages, as allowed by domain setting sms_language_fallback.
Attempt to get translated content . If content is not available in the user s preferred language attempt to fall back to other languages as allowed by domain setting sms_language_fallback .
def get_translation_from_message_dict(self, domain_obj, message_dict, preferred_language_code):
        """
        Attempt to get translated content. If content is not available in the user's preferred language,
        attempt to fall back to other languages, as allowed by domain setting sms_language_fallback.

        By default, try all possible fallbacks before giving up (same as LANGUAGE_FALLBACK_UNTRANSLATED).

        :param domain_obj: the domain object
        :param message_dict: a dictionary of {language code: message}
        :param preferred_language_code: the language code of the user's preferred language
        """

        # return untranslated content, if no translations set
        if {'*'} == message_dict.keys():
            return Content.get_cleaned_message(message_dict, '*')

        result = Content.get_cleaned_message(message_dict, preferred_language_code)

        if domain_obj.sms_language_fallback == LANGUAGE_FALLBACK_NONE:
            return result

        if not result and self.schedule_instance:
            schedule = self.schedule_instance.memoized_schedule
            result = Content.get_cleaned_message(message_dict, schedule.default_language_code)

        if domain_obj.sms_language_fallback == LANGUAGE_FALLBACK_SCHEDULE:
            return result

        if not result:
            lang = self.get_default_lang(domain_obj.name)
            result = Content.get_cleaned_message(message_dict, lang)

        if domain_obj.sms_language_fallback == LANGUAGE_FALLBACK_DOMAIN:
            return result

        if not result:
            result = Content.get_cleaned_message(message_dict, '*')

        return result
def get_translation_from_message_dict ( self , domain_obj , message_dict , preferred_language_code ) : # return untranslated content, if no translations set if { '*' } == message_dict . keys ( ) : return Content . get_cleaned_message ( message_dict , '*' ) result = Content . get_cleaned_message ( message_dict , preferred_language_code ) if domain_obj . sms_language_fallback == LANGUAGE_FALLBACK_NONE : return result if not result and self . schedule_instance : schedule = self . schedule_instance . memoized_schedule result = Content . get_cleaned_message ( message_dict , schedule . default_language_code ) if domain_obj . sms_language_fallback == LANGUAGE_FALLBACK_SCHEDULE : return result if not result : lang = self . get_default_lang ( domain_obj . name ) result = Content . get_cleaned_message ( message_dict , lang ) if domain_obj . sms_language_fallback == LANGUAGE_FALLBACK_DOMAIN : return result if not result : result = Content . get_cleaned_message ( message_dict , '*' ) return result