Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New order of language flags


Guest

Recommended Posts

Hey,

 

I use 3 languages on my site and everything works fine. Unfortunately the language with the language_id=3 is the native language.

OSC sorts the language flags by the id.

 

Is there a chance to sort by id descending ??

 

How should I update the code:

 

-------------------------------------------------

 

includes/boxes/languages.php

------------------

 

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_LANGUAGES);

 

new infoBoxHeading($info_box_contents, false, false);

 

if (!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);

 

new infoBox($info_box_contents);

?>

 

--------------------------------------------

 

Thanks a lot for your help

 

spoon_hh

Link to comment
Share on other sites

you can set the language sort order in the admin

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...