• Hi everyone

    Is it possible to “enable” wordpress login form to detect browser language?
    I am creating a multilanguage website with a custom register form. I created the registration form already and it works nice. I have trouble with wordpress login form.
    Currently the login form language is the language that is set in the general settings. Is there a simple way to force wordpress to detect browser language and serve the login form in the correct language if it exist?

    BR, Igor

Viewing 1 replies (of 1 total)
  • Which plugin you are using for making site multilingual ? I assume you just need to change labels/placeholders of login form as per the detected browser language. Plugin should have option to change/add labels as per selected language.

    In WordPress/PHP manually you can check/detect browser language as :

    
    $language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
    $lang = explode(',', $language);
    $lang[0];
    

    $lang[0] will give you browser language. You can play around with this.

Viewing 1 replies (of 1 total)
  • The topic ‘Login form in browser language’ is closed to new replies.