Ecommerce Templates > General Help > Multiple languages

Multiple languages - How it works

This feature was added in Version 4.8.0 and allows you to have up to 3 languages running off the same database and control panel. You can select the number of languages you require and which parts of the store you want to translate from your main admin page. The full set up details are outlined below.

How to set it up

The first thing you will need to do is to define how many languages you will be using and which parts of the store you are going to translate. In the main admin settings of the control panel you should see a drop down menu for the number of languages and a box with the different sections. Use Ctrl + Click for multiple selections.

Language settings

As you will probably want to offer the navigation and information pages in other languages then the next thing you will need to do is upload all the store files and vsadmin folder to a new folder on your server. For example, if you are going to have a Spanish based store then make a folder called /spanish/ on your server and upload all the files there.

Open the files and find the line (in the ASP Version)

<!--#include file="vsadmin/inc/languagefile.asp"-->

and change that to

<!--#include file="vsadmin/inc/languagefile_es.asp"-->

For the PHP version find

<?php include "vsadmin/inc/languagefile.php" ?>

and change that to

<?php include "vsadmin/inc/languagefile_es.php" ?>

The "_es" is the suffix corresponding to Spanish. Other options available are de dk en es fr it nl pt - please note that the translation of all entries may not be complete but it is a good starting point for a multi-language store.

The last thing you need to do is to tell the database which language is being used in that particular version. Open vsadmin/includes.asp or vsadmin/includes.php for the new language store you have set up and add this to the list for the ASP version:

languageid=2
orstorelang="es"

..or for the PHP version:

$languageid=2;
$orstorelang='es';

where the number 2 is the identifier of the language. As an example if you have the main store set up in English and language versions for Spanish and French then you would have the languageid as 1 for English, 2 for Spanish and 3 for French in the respective include pages. The orstorelang parameter allows the software to send out the correct language in the email a friend, order emails etc. "es" is the example for Spanish but you can choose the correct version for the language you are employing.

You can now go into your control panel and start adding the information for the alternative languages. As an example if you have chosen to have separate language product names then in the products admin you should see three boxes after placing the cursor in the first name field, the first for the main store language the next two for the alternatives:

Multiple languages

The same is true of the description fields. Place the cursor in the description field and the other language boxes should appear.

Once that is all set up you can add links from your main store to the two new language stores.

Notes

The multiple language feature will work fine with search engine friendly URLs but unfortunately not with the WordPress shopping cart

You can specify which languages should show in the product reviews with the following addition to vsadmin/includes.asp

ratingslanguages="0,1,2,3,4"

or in vsadmin/includes.php

$ratingslanguages='0,1,2,3,4';

This sets the store to show the ratings using the language id's in the parameter.

.