Saves cached translations (cached in model instances as dictionaries).

def save_translations(self, instances):
        """
        Saves cached translations (cached in model instances as dictionaries).
        """
        if not isinstance(instances, (list, tuple)):
            instances = [instances]

        for instance in instances:

            translations = []

            for obj in instance._linguist.translation_instances:
                if obj.field_name:
                    obj.object_id = instance.pk
                    if (obj.is_new and obj.field_value) or (
                        obj.has_changed and not obj.is_new
                    ):
                        field = instance.get_field_object(obj.field_name, obj.language)
                        if hasattr(field, "pre_save") and callable(field.pre_save):
                            obj.field_value = field.pre_save(instance, True)

                    translations.append(obj)

            to_create = [
                (obj, self.model(**obj.attrs))
                for obj in translations
                if obj.is_new and obj.field_value
            ]
            to_update = [
                obj for obj in translations if obj.has_changed and not obj.is_new
            ]
            to_delete = [obj for obj in translations if obj.deleted]

            created = True

            if to_create:
                objects = [obj for cached, obj in to_create]
                try:
                    with transaction.atomic():
                        self.bulk_create(objects)
                except IntegrityError:
                    created = False

            if to_update:
                for obj in to_update:
                    self.filter(**obj.lookup).update(field_value=obj.field_value)
                    obj.has_changed = False

            if created:
                for cached, obj in to_create:
                    cached.is_new = False
                    cached.has_changed = False

            if to_delete:
                for obj in to_delete:
                    self.filter(**obj.lookup).delete()
                    obj.has_changed = False