Import content and its translations from CSV (managing entityreference field)

In this page, we will see how to handle an entityreference field in content type 2 referencing a content of content type 1 without having the id of the target, only its title.

And of course in all the languages we want.


For the main language import, we will be using an entityfieldquery to get the id of the content of content type 1 in the main language.
For the other languages import, we will use the main language import to be sure of the id of the target.

Import content and its translations from CSV

Using migrate-7.x-2.6-RC1.

The main of this cookbook is to import one content type in as many languages as you want using CSV import.

It assumes you have one csv file per language and that in the csv, the content for all its translations is at the same line.

Force using "" to avoid problem with language like russian chinese, japanese, arabic, etc...

The translation file appears to have a missing or malformed header

It seems like my installation doesn't allow my .po file to be imported.

Everytime I try to import a .po file I'm getting the following error:

The translation file [some_language.po] appears to have a missing or malformed header.

What kind of header is it referring to? My .po file simply consists of strings, nothing more:

Taxonomy upgrade extras: 

Translating OpenAidMap

Translating the OpenAidMap profile can take two routes, either at installation or after installation of the profile;

Translating OpenAidMap after installation

  1. Download the translation files of the profile in the given language from the server.
  2. Place the translation file in the translations directory of the profile i.e profiles/openaidmap/translations
  3. Go to the Languages page (/admin/config/regional/language) under the Regional and languages configuration page.
  4. On the Languages page, click the "Add language" button, choose your preferred language from the drop-down list of the supported languages and add the language by clicking the "Add language" button.
  5. Translation files of the profile and modules will be imported into the database.
  6. After the translation files of your preferred language have been imported, you can set the particular language as the default by checking the "Default" radio button next to the language and then click the "Save configuration" button.

Installing OpenAidMap in your preferred language

    i18n setup

    This is a summary of the process of how to setup a multilingual site with domain access. Please feel free to edit any parts which are incorrect or that may confuse users. Content is based on how we made our sites work and on this tutorial by Jose Reyero:

    If you have installed Domain Access and all seems to work fine, but then you want some domains (or subdomains) to be in different languages, for example:
    - (english)
    - (french)
    - (spanish)
    - (spanish)
    - (english)
    - (german), etc.

    The following is assuming you correctly setup your affiliate domains and/or subdomains in your settings.php file.

    Change the default language
    1. Enable the correct modules (Domain Access, Domain Variable, Domain Locale, Internationalization & Variable). See links to these modules at the end of this page.

    2. Enable the languages you will be using here: admin/config/regional/language

    3. Enable URL detection method here (must be Path prefix): admin/config/regional/language/configure


    Subscribe with RSS Subscribe to RSS - i18n