Post by JockePocke » Wed Mar 01, 2017 5:26 am

Opencart 2.3.0.2 multistore with multiple languages.
I only want 1 language displayed in the front-end per store. However the browser automatic language detection changes the language to an undesired language. I.e. I have a Swedish site in Swedish language. However if I'm using an "English browser" site will change language to English.

Anyone knows how to change the code to disable the automatic browser language detection?

New member

Posts

Joined
Wed Jan 11, 2012 5:51 am

Post by paulfeakins » Wed Mar 01, 2017 6:12 pm

Sometimes finding the answer to stuff like this can be done by asking the Linux command line in the right way:

Code: Select all

paul@ant$ grep -r -i -E 'detect.*language' .
./catalog/controller/startup/startup.php:			// Try using local to detect the language
./catalog/controller/startup/startup.php:				// Try using language folder to detect the language
./catalog/controller/startup/startup.php:						$detect = strtolower($browser_language);
So to explain the above I just searched the whole codebase for "detect language" and it shows this is done in:
/catalog/controller/startup/startup.php

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JockePocke » Thu Mar 02, 2017 5:00 am

Thanks a million for pointing me in the right direction!

New member

Posts

Joined
Wed Jan 11, 2012 5:51 am

Post by masterross » Fri Aug 24, 2018 2:21 am

Hi JockePocke,
Did you able to disable it?
Please share how to.
Auto detection is probably the stupidest "feature"implemented!

Pottery Glaze shop


New member

Posts

Joined
Mon Jan 02, 2017 7:07 pm
Who is online

Users browsing this forum: No registered users and 40 guests