carthrina Posted April 20, 2007 Posted April 20, 2007 Hello, I have a multilanguage template. I want to modify Search By Brand text into different languages. This text is in header.php. I tried to replace it by a vriable. I used <?=HEADER_BRAND?> as a vriable, and I added it in the languages/anylanguage.php as define(HEADER_BRAND, 'Search by Brand'); But I have encountred a problem with the closing ?> because this vriable is used between two other <?..?> This is my code: <? // ---- MANUFACTURERS $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { echo ' <table cellspacing=0 cellpadding=0>'. tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') .'<tr><td background=images/m19.gif width=229 height=36 class=bc> <b><?=HEADER_BRAND?></b></td></tr> <tr><td> <table cellspacing=0 cellpadding=0 width=195 align=center> <tr><td colspan=2 height=20></td></tr> <tr><td align=right> '; . . . . the rest of the code ?> Please kindly help, your ideas are much apperciated. Regards,
jasonabc Posted April 20, 2007 Posted April 20, 2007 try this: <?php // ---- MANUFACTURERS $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); if ($number_of_rows = tep_db_num_rows($manufacturers_query)) { echo ' <table cellspacing=0 cellpadding=0>'. tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get') .'<tr><td background=images/m19.gif width=229 height=36 class=bc> <b>' . HEADER_BRAND . '</b></td></tr> <tr><td> <table cellspacing=0 cellpadding=0 width=195 align=center> <tr><td colspan=2 height=20></td></tr> <tr><td align=right>';?> Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Jack_mcs Posted April 20, 2007 Posted April 20, 2007 It's already in a php block so you don't need to use the delimiters again. So change this <b><?=HEADER_BRAND?></b> to this <b>' . HEADER_BRAND . '</b> Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
carthrina Posted April 20, 2007 Author Posted April 20, 2007 WAW, cool I am so happy :) thank you very much jason and Jack
Recommended Posts
Archived
This topic is now archived and is closed to further replies.