Working with Cookies

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 4
Joined: Mon Aug 23, 2010 12:32 pm

Working with Cookies

Postby ruizjulian » Thu Oct 21, 2010 7:31 am

Hello forum geeks, I am a OJS Newbie and I am working with OJS Cookies but I can't understand how it works, if there are encrypted or how OJS can read it?

My goal is setting the "currentLocale" variable outside of OJS, setting the language in "en_EN" parameter because the default language in my OJS installation is "es_ES".

I read other post where OJS use setLocale method where:

$locale = $session->getSessionVar('currentLocale');

But I can't find the variables on the session cookie.

Thank you for your help.

Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Working with Cookies

Postby asmecher » Thu Oct 21, 2010 8:59 am

Hi ruizjulian,

Session variables are stored on the server side, and PHP sends only a single cookie to the user to identify which server-side session the user owns. If you need something that's also available on the client side (i.e. to Javascript), you'll need to use the PHP setcookie function or something similar. (See

Alec Smecher
Public Knowledge Project Team

Return to “OJS Development”

Who is online

Users browsing this forum: Google [Bot] and 1 guest