desmo8 Posted September 25, 2002 Share Posted September 25, 2002 hi i would like to have a shop logo that's change if you select an other language. now i've added the following script in the header.php: <?php if(strstr($HTTP_ACCEPT_LANGUAGE,"en")) { echo("<img src="./images/my-english-logo.gif" border="0" alt="mydomain.com">"); } elseif(strstr($HTTP_ACCEPT_LANGUAGE,"de")) { echo("<img src="./images/my-german-logo.gif" border="0" alt="mydomain.com">"); } else { echo("<img src="./images/my-english-logo.gif" border="0" alt="mydomain.com">"); } ?> so far the script is working fine. however this is browser based and if you change the language on oscommerce the shop logo doesn't change. may somebody (php-guru) can help? thanks for every feedback Link to comment Share on other sites More sharing options...
burt Posted September 25, 2002 Share Posted September 25, 2002 do a switch http://www.php.net/switch based on $language Link to comment Share on other sites More sharing options...
Guest Posted September 25, 2002 Share Posted September 25, 2002 just place this in catalog/includes/functions/html_output.php //// // Output a logo in the selected language function tep_image_logo($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/' . $image, $alt, '', '', $params); } Put your logo in the language image file and place this in the header instead of the normal logo image tag <?php echo tep_image_logo ('logo.gif', 'logo'); ?> Hope that helps Link to comment Share on other sites More sharing options...
Guest Posted September 25, 2002 Share Posted September 25, 2002 just place this in catalog/includes/functions/html_output.php //// // Output a logo in the selected language function tep_image_logo($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/' . $image, $alt, '', '', $params); } Put your logo in the language image file and place this in the header instead of the normal logo image tag <?php echo tep_image_logo ('logo.gif', 'logo'); ?> Hope that helps Link to comment Share on other sites More sharing options...
desmo8 Posted September 25, 2002 Author Share Posted September 25, 2002 thanks kenny, is working..... Link to comment Share on other sites More sharing options...
wheeloftime Posted December 29, 2004 Share Posted December 29, 2004 just place this in catalog/includes/functions/html_output.php //// // Output a logo in the selected language function tep_image_logo($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/' . $image, $alt, '', '', $params); } Put your logo in the language image file and place this in the header instead of the normal logo image tag <?php echo tep_image_logo ('logo.gif', 'logo'); ?> Hope that helps <{POST_SNAPBACK}> I was looking for something like this and it works like a charm. Thanks very much for this ! Link to comment Share on other sites More sharing options...
Guest Posted December 29, 2004 Share Posted December 29, 2004 just place this in catalog/includes/functions/html_output.php //// // Output a logo in the selected language function tep_image_logo($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/' . $image, $alt, '', '', $params); } Put your logo in the language image file and place this in the header instead of the normal logo image tag <?php echo tep_image_logo ('logo.gif', 'logo'); ?> Hope that helps <{POST_SNAPBACK}> Nice... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.