Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with default language


maxi032

Recommended Posts

Posted

I need to change the default language on my site. The new language files are created and the language is set as default on Admin but when you enter the site,... the default language is still english

 

 

Please help

Posted

This has to do with your window language (my client window is french and her start page is french, my window is english and my start page on her site is english)

There is a wat to solve this but i dont remember but if you type *default language* in the search engine ....you will get your answer

 

HTH

Posted

In your catalog/includes/application_top.php file change:

if (!$HTTP_GET_VARS['language']) $lng->get_browser_language();

to this:

//    if (!$HTTP_GET_VARS['language']) $lng->get_browser_language();

Just commented out ...put the 2 // in front

 

HTH

Posted

Thanks. I was looking for that answer too. Searching the forum is great!!! :)

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

Posted

I was wondering if you knew how to make one page in say Canada language and the rest in of the site United states

 

Almost the same but need the canada pages in canada to charge canadian prices just trying something new.

 

Is this possible without letting the user choose the language

  • 5 months later...
Posted

HI,

I upgraded to 2.2 and neede to comment out this section:

 

 

/* if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {

$lng->set_language($HTTP_GET_VARS['language']);

} else {

$lng->get_browser_language();

}

per http://www.oscommerce.com/forums/viewtopic.php?t=36173

*/

 

 

bubba30,

How will the browser understand that it's a page for Canada? Will there be a parameter?

 

Lets say you var is: $whereamI = 'CANADA';

You can use a function I guess, needs workig in syntax.:

if (($HTTP_GET_VARS['whereamI']=='CANADA') {

$lng->set_language(canadian_language);

}

GALATASARAY RULES!

ultrAslan - ultrAslan - ultrAslan

  • 9 months later...
Posted

it worked on my german shop too (2.2) with the second modification.

 

why is this not solved in the oscommerce store CVS?

Posted

but i got a new problem then: i could not change back to english language, it stayed always on german.

 

a better solution is this in In your catalog/includes/application_top.php file:

change just this in line 278:

$lng->get_browser_language();

to

      # changed
     $lng->set_language("de");
     # from http://www.oscommerce.com/forums/index.php?showtopic=36173
     # before:
     # $lng->get_browser_language();

Archived

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

×
×
  • Create New...