View Single Post
  #1  
Old 07-14-2015, 09:33 AM
 
xgarb xgarb is offline
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default X5 - Setting the language based on user's browser language

In x4 I had some code that identified the user's language preference (using weighted values) and then displayed the site in the closest language possible with English as the default.

I did this by adding code before the get_language.php include that followed the logic below to set the store language.

1) Check user is not a robot and hasn't previously chosen a language
2) Set language based on browser setting and available languages

The user could set their language to override the auto detect using a cookie that lasted a year.

I want to do this in x5 but I can't work out which class/method to override so I can add in my extra detection code.

Any pointers?
__________________
Core version: 5.5.xx
Reply With Quote