Jump to content

Problem with changing language by country


Recommended Posts

Hi everybody,

i have problem with changing language by country. I have set geolocation (uploaded GeoLiteCity.dat) and then i've turn it on. Also i've allowed access from countries i need, and forbidden access from countries i don't need. Then i used proxy from US to test accessing to the site from country i don't want to and it works well, so i can't access on the site. 

So i have allowed two countries (Czech and Slovakia) and i need to use Czech language for people coming from czech and Slovak lang. for people coming from slovakia. I've set this Yzx0ne3rJ2.thumb.png

And then Save it. but after i open this again, the flag near Country is again the default (czech)... Also i've allowed using the slovak language here 2piPPXnpXH.thumb.png

When i access to the site from Slovakia proxy it loads with the default Czech language...

 

I am using prestashop 1.5.4.1

 

Anybody knows what to do now? Feel free to ask any question!

Thanks a lot.

Sincerely

Johan

Link to comment
Share on other sites

It's best to detect and set shop language based on visitors language as passed by their browser.

 

PrestaShop included browser language detect since 1.4 but it had a bug and was never executed.

 

This but however was resolved in 1.5.6 the execution where language detect by browser worked.  This to many shop owners surprise when they upgraded to 1.5.6.

 

The 1.5.6.1 logic looked at the ISO code (language code), i.e. en fr de es.  (Note: this code is what you see in your browser URL's) and not the country.

 

This causes problem for shops that have the same language but differ country:

 

en-US US

en-GB UK

es-ES

es-MX

 

This fix goes a long way to setting correct shop language.

http://forge.prestas...wse/PSCFV-10876

Link to comment
Share on other sites

  • 2 weeks later...

It's best to detect and set shop language based on visitors language as passed by their browser.

 

PrestaShop included browser language detect since 1.4 but it had a bug and was never executed.

 

This but however was resolved in 1.5.6 the execution where language detect by browser worked.  This to many shop owners surprise when they upgraded to 1.5.6.

 

The 1.5.6.1 logic looked at the ISO code (language code), i.e. en fr de es.  (Note: this code is what you see in your browser URL's) and not the country.

 

This causes problem for shops that have the same language but differ country:

 

en-US US

en-GB UK

es-ES

es-MX

 

This fix goes a long way to setting correct shop language.

http://forge.prestas...wse/PSCFV-10876

There is deffinitely some issues with the language7country detections, because no matter what I set as my default country, when I look at my shop it goes to this address - http://my-domain.com/en/?

live_configurator_token=68f3708809b4ad0f48ea53d9928e0008&id_employee=1&id_shop=1

Why the shop keep me on the EN extention I have not been able to find out

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

There is deffinitely some issues with the language7country detections, because no matter what I set as my default country, when I look at my shop it goes to this address - http://my-domain.com/en/?

live_configurator_token=68f3708809b4ad0f48ea53d9928e0008&id_employee=1&id_shop=1

Why the shop keep me on the EN extention I have not been able to find out

 

in whichever browser,  check that the browser language is set to your preferred langauge.

 

When you visit a shop, and let's say for example you visited and/or changed the shop lang to EN, then every time you return it will be shown in EN even if your browser lang is ES.  You would need to clear the cookie before it would display in your browser lang, of course the browser lang would need to be defined in ps.

Link to comment
Share on other sites

I wish things were as simple as you say.

 

After having cleared history and cookies several times there is absolutely no change, even if I remove danish from my Firefox and default language is set to english in PS.

 

Now the shop ONLY shows Danish and as far as I can see, the only way to ghange that is to remove the danish language from PS, that is what it took to get rid of English.

 

Besides that the currency dont follow language.

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

naviate to the shop without all the appended url settings (from view my shop back office)

- http://my-domain.com/en/?

live_configurator_token=68f3708809b4ad0f48ea53d9928e0008&id_employee=1&id_shop=1

 

I should have noticed this was how you were accessing your front office.  This is not a true representation of a 'visitor'.

 

sorry I did not read your post very well

Link to comment
Share on other sites

Thats ok since I just tried as you said but it changes nothing.

 

Summa summarum: danish is gone from my Firefox and preferred language is set to English in PS, so for me its a real mystery hoHow it is possible to show my shop in danish.

Link to comment
Share on other sites

Thats ok since I just tried as you said but it changes nothing.

 

Summa summarum: danish is gone from my Firefox and preferred language is set to English in PS, so for me its a real mystery hoHow it is possible to show my shop in danish.

and did you clear your cookie?  ps remembers language selection from last visit

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...