Now what we want to do is re-create the Languages InfoBox into the Header Area – this is quite easily done if you take it step by step.
Step 1: Create a new file named header_languages.php which should contain only the following lines of code:
<?php
?>
Save this into the folder /includes/boxes/
Step 2: Open up /includes/boxes/languages.php and copy the following lines of code:
if (!isset($lng) || (isset($lng) && !is_object
($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
}
$languages_string = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng-
>catalog_languages)) {
$languages_string .= ' <a href="' .
tep_href_link(basename ($PHP_SELF),
tep_get_all_get_params(array('language',
'currency')) . 'language=' . $key,
$request_type) . '">' . tep_image
(DIR_WS_LANGUAGES . $value['directory'] .
'/images/' . $value['image'], $value['name']) .
'</a> ';
}
$info_box_contents = array();
$info_box_contents[] = array('align' =>
'center','text' => $languages_string);
Step 3: Open up the file you made in Step 1, and paste the code you copied in step 2, immediately before the ?>
Save it (remember you are saving it as header_languages.php)
Step 4: Once you have that new file saved, open it up and find the following line of code:
$info_box_contents[] = array('align' =>
'center','text' => $languages_string);
Change it to:
echo $languages_string;
Save it.
Step 5: Open up /includes/header.php and find the following code:
<td class="languageboxarea"></td>
Change it to:
<td align="right" class="languageboxarea"><?php
require(DIR_WS_BOXES .
'header_languages.php'); ?></td>
Save it!
Step 6: Now we need to set the style and position of the Flags, by opening up stylesheet.css and finding:
.languageboxarea {
background-image: url(images/logo_3.jpg);
width: 455px;
height: 78px;
}
Change it to:
.languageboxarea {
background-image: url(images/logo_3.jpg);
width: 455px;
height: 78px;
vertical-align: bottom;
padding-right: 5px;
}
Save it as stylesheet.css - and now we have our Languages Flags integrated as part of our design – your new template for the osCommerce store should now look exactly like this:











