Support » Plugin: Plugins Language Switcher » [Plugin: Plugins Language Switcher] Why using a cookie?

  • Resolved Olaf Lederer

    (@finalwebsites)


    Hi,

    thanks for providing this plugin, I work with the english version of wordpress for years and sometimes I need to build dutch websites too.

    You understand that just switching the language is a great time saver 🙂

    You’re using a cookie to store the language, why?

    setcookie('pls_language', $pls_language, time()+60*60*24*30, COOKIEPATH, COOKIE_DOMAIN);

    It would be much better to store this value in the wp_options table, this way you can setup the language by user… just a suggestion.

    Thanks again!

    http://wordpress.org/extend/plugins/plugins-language-switcher/

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulia

    (@shinephp)

    Hi,

    WordPress defines language to use at stage when it know nothing about current user. So, there was know problem with one global for the blog language option stored in wp_options, but when I tried to have separate options on per user base I’ve got a problem, described above – I need language value for current user already but I don’t know who the current user are, as WP user routine is not loaded yet :).

    If you find a way to realize this, please share and I will add WP database storage as an alternative to cookie variant.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Plugins Language Switcher] Why using a cookie?’ is closed to new replies.