emalenfant Posted February 28, 2008 Posted February 28, 2008 Hi, i have a little problem that should be easy to fix, i just don't know PHP :) I already put the link in the header to change language but what i want is only to display the alternative language ie: english when the page is in french and francais when the page is in english. I already edited french.php and english.php to include: define('HEADER_LANGUAGE_SELECTION', 'francais'); --- english.php define('HEADER_LANGUAGE_SELECTION', 'english'); --- french.php but i don't find the way to include it in header.php , here is the code: <td align="right" class="headerNavigation"><?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { if ($language != $value['directory'] ){ $languages_string .='<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'action')) . 'language=' . $key, $request_type).'" class="headerNavigation">English | Francais</a>'; } } echo $languages_string; } ?> | <?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> Help would be appreciated!
emalenfant Posted March 1, 2008 Author Posted March 1, 2008 i found the answer for those how are interested, http://www.oscommerce.com/forums/index.php?sho...=language++text
Recommended Posts
Archived
This topic is now archived and is closed to further replies.