I have my site in two languages i.e. English and French, I want that whenever a user visits the site, it must be displayed in the browser's default language. How to do it ?
-
You can do this with Locale. Set your language as default. – Nishant Nov 4 '14 at 6:59
Goto Admin -> Module -> Locale
Click on Configuration (Locale)
Enable Radio button as per you want to set default language.
You could do it something like this:
create a module (theme independant) that inserts some javascript into the page
using php, insert the current site language into the javascript as a variable
check the browser language against the site current language
if it matches, nothing happens, if not, create a redirect to mysite.com/fr/ or however you have it setup to differentiate the languages