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 revisionPrevious revision
Next revision
Previous revision
v:2.0:i18n [2016/07/27 11:46] – [What Is Customizable] adamv:2.0:i18n [2019/05/04 03:44] (current) – [Customising the email subject] adam
Line 6: Line 6:
  
 ===== What Is Customizable ===== ===== What Is Customizable =====
-  * Currency symbol (in the admin's "settings" page - "store locale" and "use international currency symbol" options)+  * Currency symbol (in the admin's "settings" page - "store locale" and "use international currency symbol" options, or if using multiple template sets, the "locale" option from the "template sets" page)
   * All customer-facing language (in the admin's "language" page)   * All customer-facing language (in the admin's "language" page)
  
 ===== What Isn't Customizable ===== ===== What Isn't Customizable =====
   * The [[https://admin.foxycart.com/|FoxyCart Admin]]   * The [[https://admin.foxycart.com/|FoxyCart Admin]]
-  * Country and state/province names in the checkout's autocompleter+  * Country and state/province names in the checkout's autocompleter (though our country and state/province selector is multilingual capable, so it will recognize and autocomplete on both ''Spain'' or ''España'').
  
 ===== Things to Watch Out For ===== ===== Things to Watch Out For =====
Line 20: Line 20:
  
 ===== Want to Enable Multiple Languages for your Cart? ===== ===== Want to Enable Multiple Languages for your Cart? =====
-Have a look at the [[https://wiki.foxycart.com/v/2.0/snippets/enable_multiple_languages|Enable Multiple Languages]] snippet for more information on how to implement this to your cart. 
  
 +With FoxyCart's [[v:2.0:template_sets|Template Set]] functionality, it's possible to have multiple languages in a single store. To do that, simply create a new template set for each language that you want to support. Refer to the [[v:2.0:template_sets|template sets]] wiki page for details on creating and using template sets with your store.
 +
 +==== Editing language strings for a specific template set ====
 +
 +If you need to make changes to a language string for a specific template set, simply head to the "Language" section of your store's FoxyCart administration, and select the relevant template set from the dropdown. You can then edit any language strings for that specific template set.
 +
 +==== 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. 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 = "" %}
 +{% if not is_subscription_dunning_cancellation and not is_subscription_dunning_reminder and not is_expiring_payment_reminder %}
 + {% if language == "german" %}
 + {% set custom_subject = "German Email Subject Line" %}
 + {% elseif language == "french" %}
 + {% set custom_subject = "French Email Subject Line" %}
 + {% endif %}
 +{% endif %}
 +{% if custom_subject != "" %}
 + {{ custom_subject|fc_output_data('email_subject') }}
 +{% endif %}</code>
 +
 +If one of the conditions is not met to set a custom string, the default subject as it is set in your store's administration will be used. You can also customise the ''bcc'' and ''from'' addresses for the email as well. See the [[v:2.0:emails#email_receipt_placeholders|email placeholders section]] for more details on this.
 ===== Want a New Language Supported? ===== ===== Want a New Language Supported? =====
 Please [[mailto:helpdesk@foxycart.com|let us know]]. We can provide you with the language includes file for you to work from, which is easier than using the web interface, and will allow you to reuse your language customizations in future stores. Please [[mailto:helpdesk@foxycart.com|let us know]]. We can provide you with the language includes file for you to work from, which is easier than using the web interface, and will allow you to reuse your language customizations in future stores.

Site Tools