Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Language icon display


ferp2

Recommended Posts

Posted

Hello,

 

Does anyone have a suggestion on how to display the language icons in the top corner of the page?

 

For instance, I have modified index.php with the following code:

 

[snip]
<div id="container"> <!-- container div contains all the content divs -->


<div id="topbar"><!-- Top bar -->
<a href="#" class="lang">
<?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
include(DIR_WS_BOXES . 'languages.php');
//include(DIR_WS_BOXES . 'currencies.php');
} ?>
</a> 
</div>
[snip]

 

The topbar class creates a black horizontal bar that is 770px by 25px. The code inside this class comes from $ROOT_DIR/includes/column_right.php. In $ROOT_DIR/ includes/boxes/languages.php, I have commented out the code that displays the language infobox header.

 

In $ROOT_DIR/includes/boxes/languages.php, the following code causes the language icons to display on the right:

 

$info_box_contents = array();
 $info_box_contents[] = array('align' => 'right',
						   'text' => $languages_string);

 

As of now, the language icons show up in the top right-hand corner of the page, but they are still in their language info box. The browser source code is as follows:

 

<!-- languages //-->
<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
 <tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
 <tr>
<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
 <tr>

<td align="right" class="boxText"> <a href="http://hwcent.lan.rmt/index.php?language=en&osCsid=1de6e772282d43ce5250749beb507231"><img src="includes/languages/english/images/icon.gif" border="0" alt="English" title=" English " width="53" height="19"></a>  <a href="http://hwcent.lan.rmt/index.php?language=fr&osCsid=1de6e772282d43ce5250749beb507231"><img src="includes/languages/french/images/icon.gif" border="0" alt="Fran?ais" title=" Fran?ais " width="59" height="19"></a> </td>
 </tr>
 <tr>
<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td>
 </tr>
</table>
</td>
 </tr>

</table>
<!-- languages_eof //-->

 

I have no idea where to find this html code, nor am I sure if modifying this code is the best way to proceed. The html code is somehow accessed in the code found in $ROOT_DIR/includes/boxes/languages.php.

 

By the way, the page does not change to the other language equivalent when clicking on the language icon.

 

Any help is appreciated.

Posted

The way that you have provided this information seems a bit confusing, however, it seems to me that you wish to provide a cleaner way for the user to change the language on the page. Is this correct?

 

Currently the base system uses a dropdown to achieve this, it seems that you want to just use an icon, is this correct?

Need Hosting? Just ask!

Posted
The way that you have provided this information seems a bit confusing, however, it seems to me that you wish to provide a cleaner way for the user to change the language on the page. Is this correct?

 

Currently the base system uses a dropdown to achieve this, it seems that you want to just use an icon, is this correct?

 

The base system I'm using has a Language box in the right column of the page with language icons that you click on to change the language.

 

What I want to do is find the best way to move the icons to a different location.

Archived

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

×
×
  • Create New...