Google Translate: |
The Language System
The ConceptOne of the big concepts in CubeCart is the ability to have multiple language support throughout the store. This is done by utilising a language directory structure, and language file.This also makes it easy to edit everything from standard button text to cart titles just through editing one file, on a per language basis. The file is located here: /language/LANG_CODE/lang.inc.php The LANG_CODE is the name of the directory located in the 'language' directory, as the screenshot to the right indicates.The Language FilesBelow is a list of the files that can be found in the language directory.
Removing Languages from the ListTo remove a language from the language dropdown list, simply delete the specific language code directory (not the actual 'language' directory).Adding a New LanguageIt's fairly easy to add a new language to the CubeCart language system. To start with, make a copy of a current language directory which matches your language as close as possible. Rename the new language directory to a two letter abbreviation.Then just edit 'config.inc.php', and you will see contents similar to the English file shown below:
<?php
Change the language name as appears in the dropdown list, and if necessary the character code set using the ISO standard code. The '$strftime' entry relates to the format of the time, more information can be gained from the PHP.net website.
$langName = "English"; $charsetIso = "iso-8859-1"; $strftime = "%A %e, %B %Y"; ?> Next you will need to translate the contents of the language file itself, 'lang.inc.php'. Don't forget to alter the flag image, 'flag.gif'. Then just upload the new directory to the 'language' directory on the server, and the language is active. |
| Comments, Feedback, Suggestions and Documentation Submissions please post in the Documentation Chat Forum. |