• Resolved Pinoss

    (@pinoss)


    Hi,

    I’m using WPML and trying to redirect users to their Browser Language. All it’s working but when I change the option ( WPML Languages -> Browser language redirect Tab) to 1 hour instead of 24 hours (the default), does not work, continue to remain for 24 hours.

    Any hack in some file or idea to solve this?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter Pinoss

    (@pinoss)

    Hi,
    I solved the problem so I’ll explain what I’ve done for if anyone needs.

    Go to plugins/sitepress-multilingual-cms/res/js/jquery.cookie.js

    From line 34 you ca see that:

    var days= options.expires, t = options.expires = new Date();
    				t.setDate(t.getDate() + days);

    Change to this :

    var t = options.expires, t = options.expires = new Date();
     var minutes = 60;
     t.setTime(t.getTime() + (minutes * 60 * 1000));

    Where : var minutes = 60 are the minutes you want until cookie expiration.

    Regards.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WPML Multilingual CMS] Remember Browser Language Cookie Not Working’ is closed to new replies.