Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Language Pb


Guest

Recommended Posts

Hello,

 

I just installed OS Commerce 2.2 on my server. I have a minor pb (I already had that pb in local) : the default language should be french and not english.

 

Even though I changed the settings in the admin section (french is set to default), it still starts the default.php page in english the first time I get connected. Where am I supposed to change the settings so that it will work ?

 

Besides that, what am I supposed to do to get the default.php page when I launch my domain name (ie www.domain.com instead of www.domain.com/default.php).

 

Thanks a lot !

Vincent

Link to comment
Share on other sites

  • 2 years later...
Hello,

I just installed OS Commerce 2.2 on my server. I have a minor pb (I already had that pb in local) : the default language should be french and not english.

Even though I changed the settings in the admin section (french is set to default), it still starts the default.php page in english the first time I get connected. Where am I supposed to change the settings so that it will work ?

Besides that, what am I supposed to do to get the default.php page when I launch my domain name (ie www.domain.com instead of www.domain.com/default.php).

Thanks a lot !

Vincent

 

 

I have exactly the same problem, my site has 3 languages (dutch, english and german) and it is suppoused to start always in dutch (that is installed as default in the administration/languages).

Could this be because my browser is in english and the code detects that?

Should other dutch users that are using dutch browsers see the shop in dutch?

 

Any ideas?

 

Cheers.

Link to comment
Share on other sites

I have exactly the same problem, my site has 3 languages (dutch, english and german) and it is suppoused to start always in dutch (that is installed as default in the administration/languages).

Could this be because my browser is in english and the code detects that?

Should other dutch users that are using dutch browsers see the shop in dutch?

 

Any ideas?

 

Cheers.

 

I have Italian installed as thedefault languabe but my windows version is English.

On my machine the main catalog file loads in English

In machines that have Italian version of windows it loads in Italian.

Link to comment
Share on other sites

Yes this is infact due to the browser rather than due to oscommerce.

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

  • 2 months later...

Try something like this in the <head> of your index.html file:

<META http-EQUIV=Refresh CONTENT="0;URL=http://qrstuv.com/catalog/index.php?language=jp"> (of course use the language code you need , eg. fr, it, en)

Be sure that the folder for that language has a "index.php" file or rename the meta to read to "default.php", or, just rename your default.php to index.php

Link to comment
Share on other sites

  • 1 month later...

asatsuru, thats not even close to a solution of this problem.

 

When I set the default language of my site to something else then English I would like to have that appear first when someone new to the site opens it (they can change it themselves if necessary). (So is this really a browser problem? - I doubt it)

 

Some sites somehow read the location you set and use that to define the default language. Can OSCommerce do the same?

Link to comment
Share on other sites

Hello,

I just installed OS Commerce 2.2 on my server. I have a minor pb (I already had that pb in local) : the default language should be french and not english.

Even though I changed the settings in the admin section (french is set to default), it still starts the default.php page in english the first time I get connected. Where am I supposed to change the settings so that it will work ?

Besides that, what am I supposed to do to get the default.php page when I launch my domain name (ie www.domain.com instead of www.domain.com/default.php).

Thanks a lot !

Vincent

 

I do not have the answer to your problem but if your version of osC is using default.php instead of index.php then it is an old version and you should replace it with the latest milestone before going any farther.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Can someone from OSCommerce help me with this problem (or inform me that this is going to be fixed soon)?

 

:P

 

well, it is not tht difficult.

 

osc recognizes the browser language setting as it should.

when that language is supported by your site, that is the language you will get.

If that language is not supported, you get the default one. Works like a charm.

 

Ofcourse, for those who do not want this to happen, you can always remove the browser_language_check from application_top and make the language go to default at all times. Mind you, the language settings in the browser are there for a reason eventhough not all users realize that. I for one get angry when I visit a site and get a different language from my browser settings while that site does support my language.

Treasurer MFC

Link to comment
Share on other sites

Yup I researched the problem. Seems like OSCommerce Default Language detection should work because it detects what language the user has set in his browser via the "HTTP_ACCEPT_LANGUAGE" Server Variable.

 

Internet Explorer: Language Detection works

(if set correctly in Control Panel / Regional and Language Options / Regional Options)

 

Mozilla Firefox: Language Detection works

(if set correctly in Main Menu / Tools / Options / General / Languages)

 

Opera: Language Detection works

(if set correctly in Main Menu / Tools / Preferences / Languages)

 

Netscape Navigator: Language Detection works

(if set correctly in Main Menu / Edit / Preferences / Navigator Category / Languages)

 

:thumbsup:

 

 

If you want to test / check / see what language your browser is set you can use the following PHP script:

<?php
   print "Language: " . $_SERVER["HTTP_ACCEPT_LANGUAGE"] . "<br>";
   print "Browser: " . $_SERVER["HTTP_USER_AGENT"]. "<br>";
?>

or visit http://www.brokendream.net/maverick/servervar/index.php

 

Cheers! :)

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...

This fix will not work on many installations. They use set_language($object) function with DEFAULT_LANGUAGE parameter which is not object or array, plus extra cookies are set. Instead just add simple function to languages.php class located in includes/classess like below:

 

function set_default_language() {

$this->language = $this->catalog_languages[DEFAULT_LANGUAGE];

}

 

And call it from the application_top.php file. You can add extra logic if you wish or just comment get_browser_language() call like below.

 

// $lng->get_browser_language();

$lng->set_default_language();

 

This worked for me so far.

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...