Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16352

CiviMail in multilingual sites: allow to define the language of the mailing, for tokens


    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code


      When using multilingual civicrm, an admin might be working in any of their enables languages, such as English and French, for example. They might also send mailings in one of those languages. Usually people send a mailing per language (ex: newsletter FR, newsletter EN).

      The problem is that cron calls the CiviMail blast, and so CiviMail will run as the default site language. This also means that any token, unsubscribe URLs, etc, will assume that the site is in the default language.

      This means that if the default site language is English, but a mailing is sent in French, the unsubscribe URL will be in English.

      Proposal to fix this: add a select widget in the civimail UI when the site is running in multilingual mode. The admin can then select the mailing language to use when the cron runs.

      • add a new UI widget
      • add a new column in the database for civicrm_mailing
      • add installer script to add the column
      • add a function that makes it easy to switch the current language after bootstrap
      • modify the mailing code so that it switches the current language to the language of the mailing.
      • expose the language field to Views

      NB: this is not a proposal to make civimail multilingual. While we do have the language preference of users, the current multilingual popups UI make it very hard to use civimail in multilingual. If we do eventually fix that, we could add a language option "en, fr, contact preferred language", but this is not in the scope of the current issue.




            • Assignee:
              monish.deb Monish Deb
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              6 Start watching this issue


              • Created: