How to setup a multi-lingual and multi-currency site

Updated on 20-October-2016 at 10:16 AM

In this tutorial, you'll learn how to setup a site that can cater for multiple languages and/or multiple currencies

In order to complete this tutorial, you will need a good understanding of working with domain names, see Managing Domains and DNS .

Please note that any JavaScript implementation provided within this tutorial is for sample purposes only. Support is not provided on troubleshooting JavaScript related issues.

Setting up your Domain Names

In order to setup a multi-currency or multi-lingual website, you will need to setup a new domain or sub-domain for each country. To do this, login to the Admin and go to Admin > Manage Domain Names then follow the steps outlined here .

During this process, you will need to select the appropriate Country and Culture settings:

  • Country - This setting will determine the currency for your products, the payment gateway and other template/layouts with country settings.
  • Culture - This setting will determine the language used for this domain name

Repeat this process for each currency and/or language you would like to use for your website

Note: You can use sub-domains for each country as this does not necessarily need to be a new top level domain for each. For example:

  • yourcompany.com - Australia
  • us.yourcompany.com - United States
  • uk.yourcompany.com - United Kingdom

Setting up your Products

You will notice that when you are setting up prices for your products, that there is a country drop down available as shown below:

This country setting correlates to the domain country setting mentioned above. Set the appropriate prices for each country/currency of your products so that when a customer is viewing your site from a certain country, they will see the relevant prices.

Setting up your payment gateways

You will notice when setting up a payment gateway, that there is a country selection drop-down. This country setting correlates to that domain country setting mentioned above. You will need to configure a payment gateway for each domain country you have setup.

For example, if you have setup 3 domain names using 3 different country settings (AU,US,UK), then you will need to configure a payment gateway for all 3 countries.

This can either be a different payment gateway for each country, or it can be the same gateway, however it will need to be setup for each country.

Identify the Customers Location

There are many ways to detect where a customer is from, but the most widely method is to ask customers to choose the country that they are from. You may have noticed when visiting an ecommerce website that you are presented with a dropdown to choose your country or currency. Once you've done this, the rest of the shopping experience is then customized based on your selection.

Drop down country selection

This simple HTML code is for a dropdown that redirects to different URLs based on the country the customer picks e.g.

 

<select onChange="document.location=this.options[this.selectedIndex].value;">
<option value=http://www.yourcompany.com>Australia</option>
<option value=http://us.yourcompany.com>USA</option>
</select>

JavaScript user country detection

You can use JavaScript to automate the country selection if you wish. Keep in mind that although this method is relatively accurate, from time to time it may not be. One of the systems built-in modules displays the users country code {module_visitorcountrycode}. You can write some basic JavaScript that uses this and redirects based on the current customers country. e.g.

<script language="javascript">
  var country = &#39;{module_visitorcountrycode}&#39;; // e.g. var country = US;
  switch(country) {
    case &#39;US&#39;:
      document.location = &#39;http://us.yourcompany.com&#39;;
      break;
    default:
      document.location = &#39;http://www.yourcompany.com&#39;;
      break;
  }
</script>

You can even use cookies to save this information and use it for future visits by the same customer.