• Resolved mrboats

    (@wpseiskaadmin)


    Trying to take your plugin into use. Mostly doing OK but on my site, however the “auto” setting for the language does not work. I can set the language manually to Finnish and it works, but the “auto” mode does not recognize Finnish (locale fi_FI), hreflang=”fi”, instead shows english texts on buttons.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jan-Peter

    (@starguide)

    The auto detection does not work, if you use a caching plugin (or caching of any other kind). The best and only option is to choose the language manually in this case.

    Cheers
    JP

    Thread Starter mrboats

    (@wpseiskaadmin)

    As a general observation that clearly is not correct as many plugins manage to handle this situation correctly (by calling get_locale() “inline”) and not being able to support auto effectively means that the plugin is not usable on any multilingual site.

    Plugin Author Jan-Peter

    (@starguide)

    That’s just me being tired: What I wanted to say is, that because the way it is implemented in Shariff it does not work with caching.

    I’ll added a new option in 4.5 that is based on the locale set by WPML and others. Just be aware that you still need to set a default language, because get_locale() does not work in all situations and might also sometimes return wrong values. If get_locale() does not return a correct value or anything at all, Shariff will fall back to the default language.

    Hope that suits your needs a bit better than the original Shariff solution.

    Cheers
    JP

    Thread Starter mrboats

    (@wpseiskaadmin)

    Thanks, now it works nicely!

    • This reply was modified 6 years, 6 months ago by mrboats.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Language selection “auto” does not work’ is closed to new replies.