Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Where can I select the language of the new node before import?
Thanks in advance
Comments
Comment #1
AniaMi CreditAttribution: AniaMi commentedsubscribe
Comment #2
pGustafson CreditAttribution: pGustafson commentedsubscribe
Comment #3
dema502 CreditAttribution: dema502 commentedsubscribe
Comment #4
ropaolle CreditAttribution: ropaolle commentedThis is not supported jet but a patch that adds this is discussed here #1183440: Multilingual Feeds - Make field import language-aware.
Comment #5
iMiksuI 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.
Comment #6
iMiksuOh, I think this has become a feature request :)
Comment #7
iMiksuAlso, 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..
Comment #8
ropaolle CreditAttribution: ropaolle commented@iMiksu. Great #5 looks like a promising patch. I'll test it and check if it works for me.
Comment #9
perarnet CreditAttribution: perarnet commentedI 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.
Comment #10
Summit CreditAttribution: Summit commentedHi,
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
Comment #11
colanToo 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.
Comment #12
amaree CreditAttribution: amaree commentedpatch 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.
Comment #13
colanActually, this looks a lot like #840142: How can the created nodes be assigned their correct language? (and other "core" fields...)
Comment #14
torpy CreditAttribution: torpy commentedRerolled 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.