• Resolved howardlivingston

    (@howardlivingston)


    Hello,

    I’m new to Bogo. Great plugin! Love the simplicity.

    I understand both widget and shortcode are provided to display a language switcher.

    But is there an auto detection of the user agent language to direct to the matched language for the accessed page, if any?

    I switched my browser (Chrome) language using an extension (Quick Language Switcher), going from English to French, but it stays on the English page.

    Still, the correct alternate page is declared in the code:

    <link rel="alternate" hreflang="en-US" href="https://www.example.com/about/">
    <link rel="alternate" hreflang="fr-FR" href="https://www.example.com/fr/about/">

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    bogo_http_accept_languages() returns a list of languages in order of the user agent language preference (HTTP Accept-Language header). Bogo doesn’t provide auto-redirection based on bogo_http_accept_languages() output because it could easily cause critical conflict issues, so implement on your own if you need it.

    Thread Starter howardlivingston

    (@howardlivingston)

    Thank you so much Takayuki! And again, thank you for Bogo.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Auto detect language’ is closed to new replies.