Blog
One area that new osCommerce users often find infuriating and confusing is that of changing the text in various locations around the store. For instance, the rather unusual phrase "Let's see What we have here" that appears in category search results and "What's new here?" on the front page.
So, why is it so difficult to find where to change these items? Actually, it's not so difficult, once you understand how osCommerce manages it's multi-lingual capability, and the aim of this short article is to provide an overview of that.
Because osCommerce has the ability to show a page in many different languages, every piece of text on the screen (note that contributions do not always respect this rule) is defined by a constant. The value of these constants are then pulled in by osCommerce by accessing the relevant language files.
Fonr instance, here is the line that defines the page title for category search results in /catalog/includes/languages/english/index.php
define('HEADING_TITLE', 'Let\'s See What We Have Here');
Because some text appears on all pages, for instance, the column infobox headings, these are defined in a file which is always included, no matter which page is actually being viewed. In the case of english, this is the file /catalog/includes/languages/english.php.
Text which appears only on a given page, will be defined in a language file which is specific to that page. For example, for text that appears on reviews.php , the english language version of these texts are stored in the file /catalog/languages/includes/languages/english/reviews.php.
Note that if you are trying to change text associated with shipping or payment options, for example to change the title of the "Check/Money Order" module, then the language files that control these are stored in the following folders (for english) :-
/catalog/includes/languages/english/modules/payment
/catalog/includes/languages/english/modules/shipping


View Comments
Post a Comment