Multilanguage CSV Import possible?

Created on 11 February 2022, about 3 years ago
Updated 30 May 2023, over 1 year ago

Hi all,

just one short question and suggestion:

The feature list on the module page lists the following features:

  • Import content into website via web UI
  • Import content into nodes, users, taxonomy terms or other content entities
  • Granular mapping of input elements to Drupal content elements
  • Modify data before import using Feeds Tamper
  • Batched import for large files
  • Exportable configuration (you can export feed configuration and import into another site via web UI)
  • One-off imports and periodic aggregation of content
  • Import or aggregate RSS/Atom feeds
  • Import or aggregate CSV
  • Import JSON or XML using the Feeds extensible parsers module
  • PubSubHubbub support
  • Extensible to import any other kind of content

also I looked into the documentation, but couldn't find an answer:

Does Feeds allow to import nodes in different translations and if yes, how is it done?

I have a translatable content type with several simple text fields which should be filled from a feeds CSV import in the different translations.

Is that possible at all? And if yes, would that be done by additional columns (e.g. _en, _de, _es etc.?) or is there a single row per language? But how do I tell the system then, that it's the same content?

If possible:
Could that be added to the features list, for example:

  • Import language in multiple languages (translations) [linked to the documentation page]

If possible or not:
Could you perhaps create a Documentation page for such multilanguage scenarios, which gives an impression what's possible or not?
That might prevent such questions here :)

Thank you very very much in advance! :)

💬 Support request
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands megachriz

    Tagging issue with "multilanguage", so I can find this issue back as soon as I plan to focus on Feeds multilingual issues again.

  • 🇨🇴Colombia Leif_S

    @MegaChriz: Just wanted to add that I am also very interested in importing content to different languages/translation sets

  • 🇮🇪Ireland marksmith

    After many trials, I have found a way to import multilingual content by Feeds. Since it appeared to me pretty complex to achieve, I share this with everyone looking for a solution. I imported multilingual content between two Drupal sites via JSON (Feeds extensible parser and JSON API Include modules), but I suppose it should work for other use cases as well.

    As suggested in #3 above under 1, I could achieve multilingual import in two steps, by creating 2 different feed types (eg., feed_type_se (default language, sweedish), feed_type_en (the translated language)).

    1. For feed_type_se (default language) I configure the feed type as follows:
    - Language: Sweedish
    - Insert new content items
    - Update existing content items

    When creating the feed, I provide the feed source in the default language, something like this:
    https://sourcesite.se/se/jsonapi/node/article?jsonapi_include=1&filter%5Bfield_issue_reference.id%5D=a7d6789c-a2af-4ee7-819a-8206b9ce25e2
    (I want to import a list of articles belonging to a journal issue, identified by the uuid a7d6789c-a2af-4ee7-819a-8206b9ce25e2)

    2. For importing the translated content, I used this configuration while creating the feed type feed_type_en.
    - Language: English
    - Do not insert new content items (!)
    - Update existing content items

    Configure the map so that the translated items are mapped to the translated target fields, like source "title" is mapped to "title" in English, etc.

    When creating the second feed, I provide the feed source in the translated language (here English), something like this:
    https://sourcesite.se/en/jsonapi/node/article?jsonapi_include=1&filter%5Bfield_issue_reference.id%5D=a7d6789c-a2af-4ee7-819a-8206b9ce25e2

    As for the unique field for the import to be mapped, I created a custom JSON ID field (field_json_id) on the target content type to be fed from the source. The source that will be imported into this field is the UUID as above (in JSON this appears as id of the source site item).

    The tricky part is that this field_json_id, which is used as the unique field has to be marked as a translatable field (Users may translate this field) on the content type field setting. (Otherwise you get the "this title already exists" error message). And you should choose the translation language for the unique field as well, as in the image below.

Production build 0.71.5 2024