Difference between revisions of "X-Cart:Managing Languages"

From X-Cart 4 Classic
Jump to: navigation, search
m (Disabling languages)
(Overview)
Line 3: Line 3:
 
If your customers come from different countries, or you do business in a multilingual country, having your online store available in several languages will be rather advantageous to your business. X-Cart enables you to build a true multilingual store and translate the store to as many languages as you wish. You can apply several languages to all store interfaces (Customer, Admin, Provider and Partner areas) and different kind of store data, including product and category descriptions, manufacturer pages, static content, etc.
 
If your customers come from different countries, or you do business in a multilingual country, having your online store available in several languages will be rather advantageous to your business. X-Cart enables you to build a true multilingual store and translate the store to as many languages as you wish. You can apply several languages to all store interfaces (Customer, Admin, Provider and Partner areas) and different kind of store data, including product and category descriptions, manufacturer pages, static content, etc.
  
{{Note1|Note: X-Cart out of the box does not support UTF-8 character encoding. See the [[X-Cart:Server_Requirements_(X-Cart_4.4)#PHP_configuration | Server Requirements]] section for more information on using UTF-8, as well as [[X-Cart:FAQs#How_do_I_set_up_my_X-Cart_to_support_UTF-8.3F | FAQs: How do I set up my X-Cart to support UTF-8?]]}}
+
{{Note1|Note: X-Cart v4.4.5 and older versions out of the box does not support UTF-8 character encoding. See the [[X-Cart:Server_Requirements_(X-Cart_4.4)#PHP_configuration | Server Requirements]] section for more information on using UTF-8, as well as [[X-Cart:FAQs#How_do_I_set_up_my_X-Cart_to_support_UTF-8.3F | FAQs: How do I set up my X-Cart to support UTF-8?]]}}
  
 
When a store has more than one language, store users can switch between languages using a language selector. For the Customer area the selector can be either a drop-down box, a single-line box with text or a single-line box with language icons (defined by the store administrator in the <u>General settings/Appearance</u> options section);  for the Admin, Provider and Partner areas the selector is available as a simple drop-down box only. A selector contains a list of all the languages that are currently installed and activated in the store.
 
When a store has more than one language, store users can switch between languages using a language selector. For the Customer area the selector can be either a drop-down box, a single-line box with text or a single-line box with language icons (defined by the store administrator in the <u>General settings/Appearance</u> options section);  for the Admin, Provider and Partner areas the selector is available as a simple drop-down box only. A selector contains a list of all the languages that are currently installed and activated in the store.

Revision as of 14:06, 10 February 2013

Overview

If your customers come from different countries, or you do business in a multilingual country, having your online store available in several languages will be rather advantageous to your business. X-Cart enables you to build a true multilingual store and translate the store to as many languages as you wish. You can apply several languages to all store interfaces (Customer, Admin, Provider and Partner areas) and different kind of store data, including product and category descriptions, manufacturer pages, static content, etc.

Note: X-Cart v4.4.5 and older versions out of the box does not support UTF-8 character encoding. See the Server Requirements section for more information on using UTF-8, as well as FAQs: How do I set up my X-Cart to support UTF-8?

When a store has more than one language, store users can switch between languages using a language selector. For the Customer area the selector can be either a drop-down box, a single-line box with text or a single-line box with language icons (defined by the store administrator in the General settings/Appearance options section); for the Admin, Provider and Partner areas the selector is available as a simple drop-down box only. A selector contains a list of all the languages that are currently installed and activated in the store.

Managing languages 01.png

After a user has switched a language, the text of the current interface will automatically change to the selected language until the current user session expires. When the user starts a new session, the language will be switched back to the store's default language, which is set up by the store administrator.

X-Cart is delivered with the English language pack only. To add a new language you need to either import a tailored language pack or translate all the language variables on your own. The translation does not cause any technical difficulties usually, but it may take time and effort. To translate X-Cart into a different language, first you need to create a copy of an existing language and then either translate its variables directly in the Admin area or export the variables in a CSV file and edit the file with any suitable facility, including a spreadsheet editor like Microsoft Office Excel or OpenOffice.org Calc.

A tailored language pack is a CSV file with translated language variables. Language packs are prepared and distributed by independent third-party developers and dedicated X-Cart community members who have already translated their stores to other languages and who are ready to share or trade language packs they have. You can find a tailored language pack at http://forum.x-cart.com/.

This video showcases X-Cart multilingual capabilities:

Adding languages

Technically, adding a language to a store means that you create a new language either by cloning an installed language or by importing a tailored language pack, a CSV file with translated language variables.

When you create a new language without importing a tailored pack, the variables for the new language are taken from the default language for the Customer area. If some of the variables are broken or missing, X-Cart takes their values from the default language for the Admin area. If unsuccessful, the variables get the values of the English language pack. When you create a new language by importing a tailored language pack, the variables for the new language consecutively take their values from the default languages for the Customer and Admin areas, and from the English language pack. Finally, the existing variables get replaced with the values from the language pack that you import. This way of importing languages ensures that the new language will not have empty or broken variables if there were any in the language pack that you imported. For example, this may become an issue if you import a language pack for an earlier X-Cart version.

To add a language:

  1. In the Admin area, go to the Edit languages section (In X-Cart versions 4.4.0 and later, this section can be found at Content menu -> Languages; in earlier X-Cart versions, this section can be found at Administration menu -> Languages).
  2. Scroll down to the Add/Update language box.

    Managing languages 02.gif
  3. In the drop-down box Choose a language, select the name of the language that you want to add.
  4. If you are importing a tailored language pack, specify the delimiter type and the location of the import file.
    • In the drop-down box CSV delimiter, select the type of delimiter you used when preparing the import CSV file;
    • Specify the filename and the location of the import file.
      • If the file is located somewhere on the server, select Server as the source of the import file and enter in the CSV file is located on the server field an absolute path to the file;
      • If the file is located on your local computer, select Home computer as the source of the import file and use the Browse button to locate the file.
  5. Click the Add/Update language button.

After you have clicked on Add/Update language, the new language will be added to the store. X-Cart will display the Edit language box, which you can use to disable/enable the language, change the language charset and the language icon. If you edit any of the language options, remember to click the Apply button for changes to take effect.

Managing languages 03.gif

Below the Edit language box X-Cart will display another box Edit language entries, which you can use to edit some of the variables of the selected language.

Managing languages 04.gif

Setting default languages

When a store uses several languages, you should specify which languages should be used as default languages for the customer and administrator interfaces. A default language means a language in which a user interface must appear when a user first opens a particular interface (Customer, Admin, Provider or Partner area). Customer interfaces include the Customer area and the Partner area; administrator interfaces include the Admin area and the Provider area.

For registered users, X-Cart can remember what language they selected, and when a registered user logs in to the personal account, X-Cart automatically switches to the user's language, not to the default language. For anonymous users, X-Cart does not keep information about a preferred user language, and anonymous users need to switch to their language each time they visit your store.

To set a default language for the customer and administrator interfaces:

  1. In the Admin area, go to the Edit languages section (In X-Cart versions 4.4.0 and later, this section can be found at Content menu -> Languages; in earlier X-Cart versions, this section can be found at Administration menu -> Languages).
  2. Select the language you want to use as default from the Default customer language and Default admin language drop-down selectors in the Edit language box.
    • A default customer language means a default language for the Customer and Partner areas.
    • A default admin language means a default language for the Admin and Provider areas.

      Managing languages 05.gif

  3. Click the Update button to apply the changes.
Note: When you change the default admin language, it does not affect the titles, product and category descriptions in the admin area. To copy these descriptions from international descriptions:
  1. Open the International descriptions page
  2. Select default language
  3. Click Save. The international descriptions values will be copied to the main fields of products/categories.

Exporting languages

To export a language:

  1. In the Admin area, go to the Edit languages section (In X-Cart versions 4.4.0 and later, this section can be found at Content menu -> Languages; in earlier X-Cart versions, this section can be found at Administration menu -> Languages).
  2. Select the language you want to export from the Language drop-down selector in the Edit language box.

    Managing languages 06.gif

    After you have selected the language, the page will automatically refresh expanding the Edit language box, which now contains several options and controls.

    Managing languages 03.gif

  3. Select a type of a delimiter for the export file from the CSV delimiter drop-down box selector.
  4. Click the Export' button.

After you have clicked on Export, a dialog window appears. In the dialog window select to save the CSV file. If prompted, choose a location where the CSV file should be saved to.

Disabling languages

If you do not use some of the store languages any longer, you can disable them so that your store users could not select and use these languages. The option is a recommended one as opposed to deleting languages, because you will be able to easily re-enable the disabled languages if needed.

Important: X-Cart requires that at least one language must be enabled. Also you will not be allowed to disable a language if there is only one language available in the store.

To disable a language:

  1. In the Admin area, go to the Edit languages section (In X-Cart versions 4.4.0 and later, this section can be found at Content menu -> Languages; in earlier X-Cart versions, this section can be found at Administration menu -> Languages).
  2. Select the language you want to disable from the Language drop-down selector in the Edit language box.

    Managing languages 06.gif

    After you have selected the language, the page will automatically refresh expanding the Edit language box, which now contains several options and controls.

    Managing languages 03.gif

  3. Click the Disable' button.

After you have clicked on Disable, X-Cart will reload the page, and the Disable button will turn to the button Enable, which you should use to enable the disabled language if needed.

Managing languages 07.gif

Deleting languages

For some reason you may need to delete one of the store languages. It is recommended that you never delete the English language pack that is delivered with X-Cart. And if you do not need to use the English language in your store, simply disable it according to the instructions in the #Disabling languages section of this manual. Whichever language you delete, it is recommended that you first export the language pack for this language so that you could restore the language if needed. For instructions on how to export a language, refer to the #Exporting languages section of this manual.

Important: X-Cart requires that at least one language must be installed. Also you will not be allowed to delete a language if there is only one language available in the store.

To delete a language:

  1. In the Admin area, go to the Edit languages section (Administration menu -> Languages).
  2. Select the language you want to delete from the Language drop-down selector in the Edit language box.

    Managing languages 06.gif

    After you have selected the language, the page will automatically refresh expanding the Edit language box, which now contains several options and controls.

    Managing languages 03.gif

  3. Click the Delete button and confirm your action when prompted.

After you have clicked on Delete, X-Cart will display a confirmation message saying that the language has been deleted successfully.