Guest Posted February 1, 2009 Posted February 1, 2009 I have a dual language support question. I know that osCommerce supports language packs (which is great) however my site is based on a template I purchased which has modified headder and footer.php files in the catalog/includes directory. Where I would like some advice is how to point to the alternative language header and footer.php files (in which I inserted the relevant translations) that I have created from the original header and footer.php files (located in includes). Any advice would be welcome.
germ Posted February 1, 2009 Posted February 1, 2009 <?php if ( $language == 'english' ) { require(DIR_WS_INCLUDES . 'header1.php'); // name of english header file here else require(DIR_WS_INCLUDES . 'header2.php'); // name of other language header file here } ?> Do the same with the footer. ;) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
♥geoffreywalton Posted February 1, 2009 Posted February 1, 2009 If the change is just to text you could put the translations into /includes/english.php, /includes/spanish.php etc and use the normal method to get the text to display in the appropriate language. If it includes language images this can also be handled like language buttons. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.