We have a very specific automatic site installation using Drupal Installation Profiles and Drush command-line utility. The installation profile works quite well and runs without any errors/warnings.

The installed sites have to support three languages (German, French and Italian). These languages are imported and enabled during the installation process. The e-mail translations for user registration, password recovery, etc. are imported as well.

After updating the Drupal core to version 7.15, the e-mails cannot be imported anymore and only show up in the default language. Translating the e-mail templates in "Home » Administration » Configuration » People" view doesn't work either. The form displays an error stating "This is a multilingual variable." and has a red border around the e-mail translation body field.

The error statement is very odd, since we assume this translation function should only operate on multilingual variables. And the e-mail templates are definitely defined as multilingual values in backend.

Are we missing something? Or the translation process is broken after updating the Drupal core and the Entity API? We appreciate any solutions, ideas and patches.

Important to mention, we can not upgrade the Drupal core and the modules to the latest version, since we use custom packages in our repositories shared between different projects.

We have the following modules installed:

  • Drupal core 7.15
  • CKEditor - WYSIWYG HTML editor 7.x-1.8
  • Email Registration 7.x-1.0
  • Entity API 7.x-1.0-rc1
  • Features 7.x-1.0-beta6
  • Google Analytics 7.x-1.3
  • Image Resize Filter 7.x-1.13
  • jQuery Update 7.x-2.3-alpha1+0-dev (2012-Sep-28)
  • Libraries API 7.x-1.0
  • Node export 7.x-3.0-rc1
  • Styles 7.x-2.0-alpha8
  • Superfish 7.x-1.8
  • Token 7.x-1.5
  • Translation template extractor 7.x-1.0
  • Universally Unique IDentifier 7.x-1.0-alpha2
  • Variable 7.x-2.2
  • Wysiwyg 7.x-2.1

And the code in installation profile to save translated variable looks like this:

foreach ($templates as $language_code => $language_templates) {
    foreach ($language_templates as $key => $value) {
            db_insert('variable_store')->fields(array(
                    'realm'      => 'language',
                    'realm_key'  => $language_code,
                    'name'       => $key,
                    'value'      => $value,
                    'serialized' => 0
            ))->execute();
    }
}