Skip to content

Detect the user language browser setting and redirect to the lang version of the website

License

Notifications You must be signed in to change notification settings

huckbit/browser-lang-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Browser Language Detect and Redirect

Detect the browser language settings and redirect to the corrispondent lang-website.

The redirection works just for the first request to the site index (homepage).

  • Insert the website_base_url in config.php (test purpose only, setup the app to work with your website)
  • Set the languages inside the array usedLanguages.php.

The default address format needs to be:

http://www.websitename.io/lang/

e.g.:

http://www.websitename.io/it/

The app uses sinergi/browser-detector to perform the language check.

About

Detect the user language browser setting and redirect to the lang version of the website

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages