Documentation You are here: start » v » 2.0 » i18n

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
v:2.0:i18n [2017/04/26 07:02]
127.0.0.1 external edit
v:2.0:i18n [2019/05/04 03:44] (current)
adam [Customising the email subject]
Line 29: Line 29:
 ==== Customising the email subject ==== ==== Customising the email subject ====
  
-Currently the email subject sent out with the email receipt is not a language string, but is set on the emails template page directly. If you want to customise ​this based on the language set for the cart, you'll need to include a little Twig logic in your email template. Paste the following at the top of your email templates (both the text and HTML versions if you're using both options), and customise it to cover the languages that you're supporting in your template sets:+Currently the email subject sent out with the email receipt is not a language string, but is set on the emails template page directly. ​The exception to this is for our subscription dunning functionality,​ which is set as part of the language settings, specifically the ''​email subject subscription cancelled'',​ ''​email subject subscription past due''​ and ''​email subject expiring payment reminder''​ strings. 
 + 
 +If you want to customise ​the email subject ​based on the language set for the cart, you'll need to include a little Twig logic in your email template. The following is an example of that for updating just the email subject for the email receipt (and not the subscription dunning emails). Paste the following at the top of your email templates (both the text and HTML versions if you're using both options), and customise it to cover the languages that you're supporting in your template sets:
  
 <​code>​{% set custom_subject = ""​ %} <​code>​{% set custom_subject = ""​ %}
-{% if language == "​german"​ %} +{% if not is_subscription_dunning_cancellation and not is_subscription_dunning_reminder and not is_expiring_payment_reminder %} 
- {% set custom_subject = "​German Email Subject Line" %} + {% if language == "​german"​ %} 
-{% elseif language == "​french"​ %} + {% set custom_subject = "​German Email Subject Line" %} 
- {% set custom_subject = "​French Email Subject Line" %}+ {% elseif language == "​french"​ %} 
 + {% set custom_subject = "​French Email Subject Line" ​%} 
 + {% endif %}
 {% endif %} {% endif %}
 {% if custom_subject != ""​ %} {% if custom_subject != ""​ %}

Site Tools