Skip to content

Instantly share code, notes, and snippets.

@willwright82
Created November 28, 2017 10:32
Show Gist options
  • Save willwright82/77ad5fbb12d228a4ea406c8b3409a7b7 to your computer and use it in GitHub Desktop.
Save willwright82/77ad5fbb12d228a4ea406c8b3409a7b7 to your computer and use it in GitHub Desktop.
Get user language based on Locale
// To get the language of your visitor:
var language = window.navigator.userLanguage || window.navigator.language;
console.log(language);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment