Digerdoo Posted November 30, 2004 Share Posted November 30, 2004 Where i can find header what change if i change language ? Link to comment Share on other sites More sharing options...
wheeloftime Posted November 30, 2004 Share Posted November 30, 2004 Where i can find header what change if i change language ? <{POST_SNAPBACK}> I suppose you mean the header with 'My Account', 'Cart Contents' etc. ? You will find the information for that within /catalog/includes/language and then the seperate language .php files you see there (english.php or dutch.php etc.). The page header is constructed by /catalog/includes/header.php Link to comment Share on other sites More sharing options...
Digerdoo Posted December 1, 2004 Author Share Posted December 1, 2004 I suppose you mean the header with 'My Account', 'Cart Contents' etc. ?You will find the information for that within /catalog/includes/language and then the seperate language .php files you see there (english.php or dutch.php etc.). The page header is constructed by /catalog/includes/header.php <{POST_SNAPBACK}> --------------------------------> I know where is header.php but i want change header image if i change language..so i can put english and deuts logos and other.. So is this possible : catalog/includes/language/english/header_english.php catalog/includes/languages/deuts/header_deuts.php Link to comment Share on other sites More sharing options...
wheeloftime Posted December 1, 2004 Share Posted December 1, 2004 -------------------------------->I know where is header.php but i want change header image if i change language..so i can put english and deuts logos and other.. So is this possible : catalog/includes/language/english/header_english.php catalog/includes/languages/deuts/header_deuts.php <{POST_SNAPBACK}> I am looking for something like that also. So far it seems it is not possible as there is no language dependant header. I am sure you can write something if you know enough PHP ?! Link to comment Share on other sites More sharing options...
DanielG Posted December 1, 2004 Share Posted December 1, 2004 I would like to know when you find something. My site is also bilingual and I need that feature. Link to comment Share on other sites More sharing options...
berkedam Posted December 5, 2004 Share Posted December 5, 2004 Quick_n_Dirty because i'm not a very good PHP-coder, actually a very bad one :D Something like this works (I tried-it): <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <?php if ($language == "dutch") { require(DIR_WS_INCLUDES . 'header_dutch.php'); } ?> <!-- <?php require(DIR_WS_INCLUDES . 'header.php'); ?> // --> <?php if ($language == "german") { require(DIR_WS_INCLUDES . 'header_german.php'); } ?> I left the uncommented standard header in there for your reference. Of course you could leave the first or second header unchanged and not renamed but for clarity it may be benificial Don't forget the make the other necessary changes so that the headers are called. "If you're working on something new, then you are necessarily an amateur." Link to comment Share on other sites More sharing options...
DanielG Posted December 5, 2004 Share Posted December 5, 2004 It works like a charm! And so simple! Thanks! :D http://www.encredirect.net I have the address: http://www.inkstore.ca that will be redirected toward the english version of the site. Link to comment Share on other sites More sharing options...
Edze Posted December 5, 2004 Share Posted December 5, 2004 Quick_n_Dirty because i'm not a very good PHP-coder, actually a very bad one :D Something like this works (I tried-it): <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <?php if ($language == "dutch") { require(DIR_WS_INCLUDES . 'header_dutch.php'); } ?> <!-- ?<?php require(DIR_WS_INCLUDES . 'header.php'); ?> // --> <?php if ($language == "german") { require(DIR_WS_INCLUDES . 'header_german.php'); } ?> I left the uncommented standard header in there for your reference. Of course you could leave the first or second header unchanged and not renamed but for clarity it may be benificial Don't forget the make the other necessary changes so that the headers are called. <{POST_SNAPBACK}> Hi John, Can you please tell me in which file you made these changes and are there more files that need changes? I suppose that in your example the header_dutch.php and header_german.php files are copies of header.php with their own changes ? With kind regards, Edze Link to comment Share on other sites More sharing options...
berkedam Posted December 6, 2004 Share Posted December 6, 2004 Hi John,[1] Can you please tell me in which file you made these changes [2] and are there more files that need changes? [3] I suppose that in your example the header_dutch.php and header_german.php files are copies of header.php with their own changes ? With kind regards, Edze Hi Edze, <grin> Here we meet again :D [1] Now i'm disappointed. header.php is called in index.php [2] The new files ? Dutch + English =1, Espagnol ? [3] Yesssss "If you're working on something new, then you are necessarily an amateur." Link to comment Share on other sites More sharing options...
wheeloftime Posted December 6, 2004 Share Posted December 6, 2004 Quick_n_Dirty because i'm not a very good PHP-coder, actually a very bad one :D Something like this works (I tried-it): <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <?php if ($language == "dutch") { require(DIR_WS_INCLUDES . 'header_dutch.php'); } ?> <!-- ?<?php require(DIR_WS_INCLUDES . 'header.php'); ?> // --> <?php if ($language == "german") { require(DIR_WS_INCLUDES . 'header_german.php'); } ?> I left the uncommented standard header in there for your reference. Of course you could leave the first or second header unchanged and not renamed but for clarity it may be benificial Don't forget the make the other necessary changes so that the headers are called. <{POST_SNAPBACK}> Duidelijk :) Een simpele maar doeltreffende oplossing :thumbsup: Hartelijk dank ! Link to comment Share on other sites More sharing options...
Digerdoo Posted December 6, 2004 Author Share Posted December 6, 2004 Duidelijk :) Een simpele maar doeltreffende oplossing :thumbsup: Hartelijk dank ! <{POST_SNAPBACK}> thanx guys! Link to comment Share on other sites More sharing options...
boxtel Posted December 6, 2004 Share Posted December 6, 2004 thanx guys! <{POST_SNAPBACK}> no need for that : in your language file includes/languages/dutch.php define('SHOP_LOGO','images/dutch_logo.jpg'); in your language file includes/languages/german.php define('SHOP_LOGO','images/german_logo.jpg'); in header.php: <?php echo '<img src="' . SHOP_LOGO . '">'; ?> like that. Treasurer MFC Link to comment Share on other sites More sharing options...
berkedam Posted December 6, 2004 Share Posted December 6, 2004 no need for that : in your language file includes/languages/dutch.php define('SHOP_LOGO','images/dutch_logo.jpg'); in your language file includes/languages/german.php define('SHOP_LOGO','images/german_logo.jpg'); in header.php: <?php echo '<img src="' . SHOP_LOGO . '">'; ?> like that. <{POST_SNAPBACK}> Nice addition.And looking at his site, in DanielG's case that would have been sufficient :D "If you're working on something new, then you are necessarily an amateur." Link to comment Share on other sites More sharing options...
Edze Posted April 15, 2006 Share Posted April 15, 2006 Nice addition.And looking at his site, in DanielG's case that would have been sufficient :D Hi John, I tried this simple solution with the dutch_logo.gif and the english_logo.gif in the dutch.php and english.php. Where in the header.php do I insert the: <?php echo '<img src="' . SHOP_LOGO . '">'; ?> and what to do in header.php with this line: <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.gif', 'company-name') . '</a>'; ?></td> Thanks! Edze Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.