problems with entity translation insert hook

I’m using the entity_translation_insert() hook to set the value of a field when a node is translated.
I can successfully edit the $entity from within the implementation, but how should I save the resulting node?

I can’t call node_save because it would start an endless loop. I tried field_attach_update but the result is the same (i.e. loop).

I’ve tried following this article, with no luck: http://anthonypower.com/notebook/assigning-node-field-values-hook-insert-and-update-right-way


Go to Source of this post
Author Of this post: Sifro
Title Of post: problems with entity translation insert hook
Author Link: {authorlink}