Answers.Body: <p>Yes, it's a know limitation. The language used is the language of the cron job. If you manually launch the scheduled task with the proper language, you should be able to send in the proper language.</p>
  
  <p>The way we intend to solve it is to add some option to tell in which language we want the mailing to be send - cf. <a href="https://issues.civicrm.org/jira/browse/CRM-16352" rel="nofollow">https://issues.civicrm.org/jira/browse/CRM-16352</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-18T20:42:00.770Z
Answers.Text: It's now fixed in core - also see https://www.symbiotic.coop/en/mailings-now-aware-recipients-language for more details
Answers.UserDisplayName: samuelsov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-19T18:16:30.653Z
Answers.LastActivityDate: 2016-09-19T18:16:30.653Z
Answers.UserDisplayName: samuelsov
Body: <p>My organisation has members who speak different languages, and we send them emails written in the language they speak.</p>
  
  <p>These emails have an opt-out link, generated by the token <code>{action.optOutUrl}</code>. Our problem is that the link always leads to the English version of the form, while we would like it to be in the same language as the email. Same thing for the optout confirmation. So for example the token should generate www.example.com/<strong>de</strong>/civicrm/mailing/optout? when sending an email in German (our CMS is Drupal).</p>
  
  <p>I can see two ways for CiviCRM to do that:</p>
  
  <ul>
  <li>Use the preferred language of the user</li>
  <li>Use the language used by the person who creates the mailing</li>
  </ul>
  
  <p>Actually, it seems the second option is almost there: if I create the mailing from an interface in German (/de/civicrm/a/#/mailing/xxx), the <strong>Test</strong> mail has the link generated for German, but unfortunately the real mailing doesn't.</p>
  
  <p>Is this something lacking from civicrm, or am I missing something? I would rather avoid having to create one token and one optout message per language, especially for the former as it requires development.</p>
  
Tags: <civimail><tokens><i18n>
Title: How to localize opt-out link in mailing
ThreadText: # How to localize opt-out link in mailing
  
  (Asked by: username_0 on 2016-07-06)
  
  My organisation has members who speak different languages, and we send them emails written in the language they speak.
  
  These emails have an opt-out link, generated by the token `{action.optOutUrl}`. Our problem is that the link always leads to the English version of the form, while we would like it to be in the same language as the email. Same thing for the optout confirmation. So for example the token should generate www.example.com/**de**/civicrm/mailing/optout? when sending an email in German (our CMS is Drupal).
  
  I can see two ways for CiviCRM to do that:
  
  * Use the preferred language of the user
  * Use the language used by the person who creates the mailing
  
  Actually, it seems the second option is almost there: if I create the mailing from an interface in German (/de/civicrm/a/#/mailing/xxx), the **Test** mail has the link generated for German, but unfortunately the real mailing doesn't.
  
  Is this something lacking from civicrm, or am I missing something? I would rather avoid having to create one token and one optout message per language, especially for the former as it requires development.
  
  **Tags:** civimail, tokens, i18n
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-09-19. Score: 1 | Accepted answer
  
  Yes, it's a know limitation. The language used is the language of the cron job. If you manually launch the scheduled task with the proper language, you should be able to send in the proper language.
  
  The way we intend to solve it is to add some option to tell in which language we want the mailing to be send - cf. <https://issues.civicrm.org/jira/browse/CRM-16352>
  
  > **Comments:**
  > **username_1**: It's now fixed in core - also see https://www.symbiotic.coop/en/mailings-now-aware-recipients-language for more details  
  
  ---
  
  