Difference between revisions of "X-Cart:Managing Languages"
m (→Setting default languages) |
|||
(8 intermediate revisions by 2 users not shown) | |||
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. | ||
Line 13: | Line 13: | ||
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. | 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 | + | A tailored language pack is a CSV file with translated language variables. Language packs can be obtained from 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 the language packs they have. Some good language packs are available at https://marketplace.x-cart.com/addons-modules/Languages-translations/google-translations/ and https://forum.x-cart.com/. |
This video showcases X-Cart multilingual capabilities: | This video showcases X-Cart multilingual capabilities: | ||
− | < | + | <youtube>fQ-f65G0Sbk</youtube> |
==Adding languages== | ==Adding languages== | ||
Line 27: | Line 27: | ||
To add a language: | To add a language: | ||
− | # In the Admin area, go to the <u>Edit languages</u> 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). | + | # In the Admin area, go to the <u>Edit languages</u> 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). |
# Scroll down to the <u>Add/Update language</u> box.<br><br>[[Image:managing_languages_02.gif|640px]] | # Scroll down to the <u>Add/Update language</u> box.<br><br>[[Image:managing_languages_02.gif|640px]] | ||
# In the drop-down box '''Choose a language''', select the name of the language that you want to add. | # In the drop-down box '''Choose a language''', select the name of the language that you want to add. | ||
− | # If you are importing a tailored language pack | + | # If you are importing a tailored language pack: |
− | #* | + | #* Make sure the charset of the language pack CSV file matches your [[X-Cart:Import-Export_Troubleshooting#.22During_CSV_import.2C_data_gets_truncated_after_special_characters_or_is_not_imported_at_all._.2F_Language_file_import_does_not_work_correctly..22|system locale]]. |
− | #* Specify the filename and the location of the | + | #* From the '''CSV delimiter''' drop-down box, select the type of delimiter that is used in the CSV file that is going to be imported; |
+ | #* Specify the filename and the location of the CSV file. | ||
#** If the file is located somewhere on the server, select Server as the source of the import file and enter in the <u>CSV file is located on the server</u> field an absolute path to the file; | #** If the file is located somewhere on the server, select Server as the source of the import file and enter in the <u>CSV file is located on the server</u> 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. | #** 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. | ||
Line 68: | Line 69: | ||
To export a language: | To export a language: | ||
− | # In the Admin area, go to the <u>Edit languages</u> section ( | + | # In the Admin area, go to the <u>Edit languages</u> 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). |
# Select the language you want to export from the '''Language''' drop-down selector in the <u>Edit language</u> box.<br><br>[[Image:managing_languages_06.gif|640px]]<br><br>After you have selected the language, the page will automatically refresh expanding the <u>Edit language</u> box, which now contains several options and controls.<br><br>[[Image:managing_languages_03.gif|640px]]<br><br> | # Select the language you want to export from the '''Language''' drop-down selector in the <u>Edit language</u> box.<br><br>[[Image:managing_languages_06.gif|640px]]<br><br>After you have selected the language, the page will automatically refresh expanding the <u>Edit language</u> box, which now contains several options and controls.<br><br>[[Image:managing_languages_03.gif|640px]]<br><br> | ||
# Select a type of a delimiter for the export file from the '''CSV delimiter''' drop-down box selector. | # Select a type of a delimiter for the export file from the '''CSV delimiter''' drop-down box selector. | ||
Line 83: | Line 84: | ||
To disable a language: | To disable a language: | ||
− | # In the Admin area, go to the <u>Edit languages</u> section ( | + | # In the Admin area, go to the <u>Edit languages</u> 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). |
# Select the language you want to disable from the '''Language''' drop-down selector in the <u>Edit language</u> box.<br><br>[[Image:managing_languages_06.gif|640px]]<br><br>After you have selected the language, the page will automatically refresh expanding the <u>Edit language</u> box, which now contains several options and controls.<br><br>[[Image:managing_languages_03.gif|640px]]<br><br> | # Select the language you want to disable from the '''Language''' drop-down selector in the <u>Edit language</u> box.<br><br>[[Image:managing_languages_06.gif|640px]]<br><br>After you have selected the language, the page will automatically refresh expanding the <u>Edit language</u> box, which now contains several options and controls.<br><br>[[Image:managing_languages_03.gif|640px]]<br><br> | ||
# Click the '''Disable' button. | # Click the '''Disable' button. | ||
Line 95: | Line 96: | ||
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. | 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. | ||
− | {{Note1|Important: X-Cart requires that at least one language must be installed. Also you will not be | + | {{Note1|Important: X-Cart requires that at least one language must be installed. Also you will not be able to delete the language you are currently using for the Admin area; if you need to delete this language, first switch to a different one.}} |
To delete a language: | To delete a language: |
Latest revision as of 13:56, 22 July 2020
Contents
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.
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.
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 can be obtained from 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 the language packs they have. Some good language packs are available at https://marketplace.x-cart.com/addons-modules/Languages-translations/google-translations/ and https://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:
- 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).
- Scroll down to the Add/Update language box.
- In the drop-down box Choose a language, select the name of the language that you want to add.
- If you are importing a tailored language pack:
- Make sure the charset of the language pack CSV file matches your system locale.
- From the CSV delimiter drop-down box, select the type of delimiter that is used in the CSV file that is going to be imported;
- Specify the filename and the location of the CSV 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.
- 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.
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.
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:
- 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).
- 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.
- Click the Update button to apply the changes.
- Open the International descriptions page
- Select default language
- Click Save. The international descriptions values will be copied to the main fields of products/categories.
Exporting languages
To export a language:
- 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).
- Select the language you want to export from the Language drop-down selector in the Edit language box.
After you have selected the language, the page will automatically refresh expanding the Edit language box, which now contains several options and controls. - Select a type of a delimiter for the export file from the CSV delimiter drop-down box selector.
- 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.
To disable a language:
- 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).
- Select the language you want to disable from the Language drop-down selector in the Edit language box.
After you have selected the language, the page will automatically refresh expanding the Edit language box, which now contains several options and controls. - 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.
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.
To delete a language:
- In the Admin area, go to the Edit languages section (Administration menu -> Languages).
- Select the language you want to delete from the Language drop-down selector in the Edit language box.
After you have selected the language, the page will automatically refresh expanding the Edit language box, which now contains several options and controls. - 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.