Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Strange language switch 2.3.3


Recommended Posts

Hello everyone!


I'm running fresh 2.3.3 OsCommerce and I have installed Danish language pack, so now I have 2 languages - English and Danish. The problem is that the language changes when I click, for example, on My Account, but then it suddenly changes back when I press on a product.


How can I solve this problem and where to look for it?


Thank you in advance!



Link to comment
Share on other sites

Few things that I've figured out:

  • when English is selected everything works fine (Danish stands as the default language in admin)
  • when you select Danish then the fun starts. For example, you go through products and everything is in Danish, but then you press on My Account and it's in English, you press on a category again and it's Danish. But this doesn't happen every time - you can even press on a category several times and nothing will change but then BAM! and it's suddenly it's in English
  • on localhost everything works perfect and there is no such problem with languages

You can see it on www.wellness-aarhus.dk/catalog/index.php

Link to comment
Share on other sites

Are your browser(s) configured to use English? osC picks up the browser configuration to pick the language. There are claims it was fixed in 2.3.3, but I don't think it was completely fixed. I'll have to look at the code in application_top.php again, but I think it should use first the current selected language, then any default, and only as a last resort the browser's language. I think it's still picking the browser language first.

Link to comment
Share on other sites

The language selection in application_top.php is a piece of junk. It's always had problems with failure to set $language and $languages_id, but it's claimed that was fixed in osC 2.3.3. However, I suspect that it's still overriding your selected or default language with what the browser wants. If you search under my ID for "internationalization" or "localization" or something similar, I think I posted a revised piece of code months ago. You might experiment with that and see if it helps. I don't think I tested it on non-English languages, and it may not even be complete.

Link to comment
Share on other sites


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

  • Create New...