Jump to content

Prestashop 1.5.6 default language bug


Cata100

Recommended Posts

Hello, I am still struggle with the default language problem in Prestashop 1.5.6

 

- the website is http://www.minimecraft.ro , the default language is romanian, (http://www.minimecraft.ro/ro is the romanian site, and www.minimecraft.ro/en - the enlglish version) - now the romanian language is set as default but in some browsers firefox, edge etc. if the browser's language is english...the default URL http://www.minimecraft.ro it is set to romanian and it points to the english version :( by default, it go to http://www.minimecraft.ro but it shwows the english version :((

 

- in presta , at localization/configuration, everything is set in romanian - see attachment

 

- i cannot disable the english version at all because all the links will be broken

 

- please help me with a fix for this problem

 

Thank you!

Catalin

Edited by Cata100 (see edit history)
Link to comment
Share on other sites

Hello, I am still struggle with the default language problem in Prestashop 1.5.6

 

- the website is http://www.minimecraft.ro , the default language is romanian, (http://www.minimecraft.ro/ro is the romanian site, and www.minimecraft.ro/en - the enlglish version) - now the romanian language is set as default but in some browsers firefox, edge etc. if the browser's language is english...the default URL http://www.minimecraft.ro eben it is set to romanian , will go to english

 

- in presta , at localization/configuration, everything is set in romanian - see attachment

 

- i cannot disable the english version at all because all the links will be broken

 

- please help me with a fix for this problem

 

Thank you!

Catalin

Go to Localization > Localization and check the "Set language from browser" option

Link to comment
Share on other sites

Thnak you El Patron for the fast reply, well then it is not a bug, i can see that it is a normal behavior, but help me please to be abnormal :)

 

How can i do to set the default language as romanian, and whatever is the browser, device etc. to go to the romanian language when they reach the homepage of the website http://www.minimecraft.ro 

 

for some website in 1.6 i could see that they are able to redirect the homepage to websitename.ro/ro (and if i am doing the redirect from / to minimecraft.ro/ro i am getting errors)

 

i need a solution for this situation 

 

Thank you,

Cata

Link to comment
Share on other sites

gosh it's been long time since I worked on 1.5...getting old and forgetful

 

You will need to modify classes/cookie.php

 

find 

$this->detect_language = true

change to

$this->detect_language = false

because there is no 'clear cache' button in your old school release

 

then you will need to rename or delete the file, rename is safer for most people.

 

cache/class_index.php  rename or delete will force to ps to rebuild class cache.

Link to comment
Share on other sites

El Patron,

 

thank you for the solution proposed, i was able to change that parameter in cookie.php ,

		//checks if the language exists, if not choose the default language
		if (!$this->_standalone && !Language::getLanguage((int)$this->id_lang))
		{
			$this->id_lang = Configuration::get('PS_LANG_DEFAULT');
			// set detect_language to force going through Tools::setCookieLanguage to figure out browser lang
			$this->detect_language = false;

- i have also renamed cache/class_index.php which, indeed it was better to rename it because a new one was generated automatticaly

 

but as far i can see the situation is the same :(  (Note: i have erased individual cookies from my firefox browser too, and also tried in incognito/private mode)

 

is something that i did wrong? do i have to do soemthing else in addition? or any other recommendations are welcome

 

Thank you,

Cata

Link to comment
Share on other sites

Hello El Patron,

 

- thanks a lot for the help, it works like a charm, yes indeed it is working as i desired

 

- my browser from android it still shows the english version perhaps it remained in cache but the rest of them chrome, firefox, edge is showing the right language

 

Thank you again,

Cata

 

p.s i don't know how to close this topic :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...