Invoice for recurring contribution should be sent in the preferred language of the contact
The contact record has a "preferred language" field, which can be automatically set when people fill in Contribution or Event forms.
That field can be used in certain circumstances, such as in Mailings and in Scheduled Reminders.
However, it is not used in the following circumstances:
- In Administration > CiviContribute > Component settings, enable "tax and invoicing", and enable PDF invoices.
- In Administration > Localization > Languages, enable multilingual, and enable a second locale.
- Setup a form that supports recurring contributions, enable email receipts
- As an anonymous user, donate on that form in the second language (not the default global language), selecting a recurring (ex: daily) donation.
Double-check that the contact record that was created has the second-language. Change if it necessary (I forget where the setting is, for defining the pref. language).
Then, as time passes, notice that the recurring email receipts are in the default site language. This is because the cron or IPNs will usually run in the default site language.
CRM_Core_BAO_ActionSchedule::setCommunicationLanguage() would be a good implementation reference. We should probably move it to
CRM_Core_I18n for clarity.