Where can I select the language of the new node before import?

Thanks in advance

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AniaMi’s picture

subscribe

pGustafson’s picture

subscribe

dema502’s picture

subscribe

ropaolle’s picture

This is not supported jet but a patch that adds this is discussed here #1183440: Multilingual Feeds - Make field import language-aware.

iMiksu’s picture

Status: Active » Needs review
FileSize
1.62 KB

I am surprised that isn't already supported.

Here is a patch you might be looking for. Hope this gets reviewed and committed.

Go to node processor settings and select your language for new nodes. This setting will apply only for new nodes, existing nodes will not be updated if you change the setting and re-import.

iMiksu’s picture

Category: support » feature
Priority: Minor » Normal

Oh, I think this has become a feature request :)

iMiksu’s picture

Also, if you have taxonomy terms which are translatable, you might want to declare term language to follow node language as well.

I used idea of #1183440: Multilingual Feeds - Make field import language-aware issue patch made by #svendecabooter in comment #17 where terms were aware of field language. In our case, it's about node language..

ropaolle’s picture

@iMiksu. Great #5 looks like a promising patch. I'll test it and check if it works for me.

perarnet’s picture

I tested patch in #7, my site is running norwegian, but translation module is disabled. So the option doesn't come up. Deleting references to translation module check works for me, and the created nodes get the proper language.

-    $node->language = module_exists('translation') ? $this->config['language'] : LANGUAGE_NONE;
+   $node->language = $this->config['language'];

-    if (module_exists('translation')) {
...
-    }
Summit’s picture

Hi,

Patch is not working correct I think. After importing fields to a node with term-references. The added terms are not getting the right language, also the nodes do not get the right language.
Looking at the tables the Language column still gives "und" instead of "nl" which should be the case.

Also on #5 it says: This setting will apply only for new nodes, existing nodes will not be updated if you change the setting and re-import. Would it be possible to also update the existing nodes?

Thanks a lot in advance for your reply!
greetings,
Martijn

colan’s picture

Title: The Nodes are imported as "Language neutral". » Allow users to choose node import language
Version: 7.x-2.0-alpha4 » 7.x-2.x-dev
Status: Needs review » Needs work

Too much of this duplicates the patch over at #1183440: Multilingual Feeds - Make field import language-aware. We still need the chooser of course, as it isn't mentioned in the other issue. Let's re-roll here with just that part.

amaree’s picture

patch works beautiful for me, I find it odd though as in node import we had more options available ie the language etc, if feeds is the successor then we should at least support what it did? anyways yep patch works good for us on nodes but we are not attacking translatable terms, only multi-lingual nodes.

colan’s picture

Status: Needs work » Closed (duplicate)
torpy’s picture

Rerolled against latest 2.x-dev.

Edit:
On second thought, ignore my silly patching. Use changes over at #1183440: Multilingual Feeds - Make field import language-aware instead.