'Create, save, and return a Translation from a string.'

def translation_from_string(self, instance, lang, string):

    lang = lang.lower()
    try:
        trans = getattr(instance, self.field.name)
        trans_id = getattr(instance, self.field.attname)
        if ((trans is None) and (trans_id is not None)):
            translation = self.model.new(string, lang, id=trans_id)
        elif (to_language(trans.locale) == lang):
            trans.localized_string = string
            translation = trans
        else:
            translation = self.model.new(string, lang, id=trans.id)
    except AttributeError:
        translation = self.model.new(string, lang)
    add_translation(make_key(instance), translation)
    return translation
