Installing Language Packages
page last edited on 18 October 2017
A language package or translation as it is referred to on the Marketplace is a .csv file that contains the values of the text labels defined for a specific language.
To install a language package from the X-Cart Marketplace:
In your store’s Admin area, select My addons, then click View more addons in Marketplace to go to the X-Cart Marketplace.
Locate the translation you require. For example, enter “translation” in the search bar to find all addons of translations in the Marketplace:
Install and activate the translations you require like you do with any other addons from the Marketplace. See Installing Addons from the Marketplace.
As a result, the translation addons you have installed should be added to the Installed Addons section in your store’s Admin area:
Once you have more than one language installed and enabled, language selectors will be provided both in the Admin and Customer areas of your X-Cart store.
Try switching the language in any location, and you should see at least some of the words and phrases on the page you are viewing translated to the selected language.
For example, here’s what the My Addons page in the Admin area looks like after switching the language of the interface in Admin to German (Note the language code “DE” in the language selector):
Despite the page is opened in German it still contains English words. This happens because in X-Cart 5 pieces of text like names of sections of the user interface, various notes, comments and error messages are all stored as text labels. A text label has a name by which it can be referenced from the template or program code and one or more “translations”. A translation is a value of the label defined for a specific language. When a piece of text needs to be displayed on a page, X-Cart selects the respective text label from the database and determines which of its translations needs to be displayed - according to the language that is currently selected for viewing the page. If, for some reason, the value of the label for the selected language is missing, the label value for the default language is displayed. If the label value for the default language is missing as well, the label name is displayed.
Hence if any translation you installed in the store is not full you can finalize it by editing a respective text label or by changing the text of the chosen page directly in the store interface.
Help make this document better
This guide, as well as the rest of our docs, are open-source and available on GitHub.