Hello,

I am using feed import on a project where nodes are imported using an XML as input. This XML file has a description of the node in two languages, in two separate elements. This description is the only thing that needs translation, the rest of the fields are localized.

This is generally done by using entity translation, and setting the content type to 'translation enabled, with field translation', and making the designated field translatable.

Is this supported in feed import? I've been reading http://drupal.org/node/1417822 #4, and this seems like a fairly simple way to achieve what I want, but I'd still like to know if this is possible using the standard options.

Thanks in advance!

Comments

Sorin Sarca’s picture

Currently is not possible only from user interface. You'll have to write a few lines of code.
The method explained there http://drupal.org/node/1417822#comment-5524696 is an easy way to do it.

martijn houtman’s picture

OK, thanks! I'll look into it, or maybe try and see if I can patch your code to support multilingual fields. Currently, the fields will be set to the entity language, I think the default is to set fields to LANGUAGE_NONE, right?

Sorin Sarca’s picture

LANGUAGE_NONE is default but you can add language field from UI to change the entity language for all fields.

martijn houtman’s picture

Yeah, but what I mean is that if you currently add a node via de node form, and set the language to 'en', the fields will have the language 'und' (untranslated), while the importer gives the fields the language of the node. Is that the correct way?

theodorosploumis’s picture

Issue summary: View changes

So, if we want to import nodes that use entity translation by field (each field may have a language or not) we should use a hook_node_presave() function? Or can we set the language somewhere in the UI?

Using latest 3.x dev version.