in Web & Tech

Localize Simplenews Confirmation Emails in Drupal 6

I hope I won’t need this anymore, but just in case for future reference: On Drupal 6 and Simplenews 6.x-2.0-alpha5 I had issues when I tried to create a multilingual newsletter. Confirmation messages kept on being sent only in one language – the strings defined on ´admin/settings/simplenews/subscription´. String translation didn’t help me, although I sticked with the documentation. When I enabled the following variables as being multilinugal variables I was able to change those settings individually per language – and now confirmations are being sent in the proper language.

Just add the following snippet to your settings.php, flush caches and edit Simplenews subscription settings for each of your enabled languages:

$conf['i18n_variables'] = array(
  // Site name, slogan, mission, etc..
  'site_name',
  'site_slogan',
  // 'site_mission',
  // 'site_footer',
  // 'anonymous',
  // Different front page for each language
  'site_frontpage',
  // Primary and secondary links
  // 'menu_primary_links_source',
  // 'menu_secondary_links_source',
  // Contact form information
  // 'contact_form_information',
  // For theme variables, read more below
  // 'theme_settings',
  // 'theme_garland_settings',
  'simplenews_confirm_unsubscribe_unsubscribed',
  'simplenews_confirm_subscribe_subject',
  'simplenews_confirm_subscribe_unsubscribed',
  'simplenews_confirm_subscribe_subscribed',
  'simplenews_confirm_unsubscribe_subscribed',
);

Write a Comment

Comment