Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Language box as drop-down menu


tementa

Recommended Posts

Posted

Hi,

 

How I can to display $languagebox in a drop-down menu?

 

The file that makes the $languagebox display is includes/boxes/languages.php

 

I tried this but I get no the right result

 

 

<!-- languages //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_LANGUAGES);

 new infoBoxHeading($info_box_contents, false, false);

 if (!isset($lng) || (isset($lng) && !is_object($lng))) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language;
 }

 $languages_string = '';
 reset($lng->catalog_languages);

 $languages_array = array();
 while (list($key, $value) = each($lng->catalog_languages)) {
 $languages_array[] = array ('<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' => tep_draw_pull_down_menu('languages', $languages_string) . $hidden_get_variables . tep_hide_session_id());


 new infoBox($info_box_contents);
?>

		</td>
	  </tr>
<!-- languages_eof //-->

 

 

 

An the error that displays is this:

 

Fatal error: Cannot use string offset as an array in C:\wamp\www\tienda\includes\functions\html_output.php on line 306

Archived

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

×
×
  • Create New...