Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); // Outputs "fr", "en", "es", etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment