Can I set WordPress to display languages based on system language without a plugin?
PHP can read the ‘HTTP_ACCEPT_LANGUAGE’ header from the browser request, but this might not be easy to parse if there is more than one accepted language set. For the simplest case, when one language is set as accepted, you need to read only first 2 characters from this header: $language = substr($_SERVER[‘HTTP_ACCEPT_LANGUAGE’], 0, 2); But, … Read more