Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

different shop logo based on language


desmo8

Recommended Posts

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

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

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

  • 2 years later...
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

 

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

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

Nice...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...