function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
paul-lmipaul-lmi 

Persisting session language vs. page language or site language

From what I understand, you can forcibly set a default site language, and you can also dynamically set a language on a per page basis with something like

 

<apex:page language="{!$CurrentPage.parameters.lang}">

 

but what about keeping that language when navigating to another page?  Is it possible to set and get session-level parameters for reuse on subsequent page loads without using the portal authentication and user-language settings?

BulentBulent

There is no session cookie when you access your site in unauthenticated mode.

Unfortunately, there is no read/write cookie support in apex yet (one of the roadmap items) 

You can set your own cookie via javascript on the page and read the cookie and pass it as a parameter to the page (on each page) 

paul-lmipaul-lmi

thanks Bulent.  just looking to identify all the needs that we have before doing a full migration of a part of our site onto force.com.  at this point, the roadblocks for us are

 

  1. 24/7 uptime for SSL users, which you mentioned was on the roadmap in another thread
  2. Session handling and manipulation for anonymous visitors (this would cover more than just lang for us, but that's the big piece)
  3. Geo-location-based access for SSL users.  caching is great for static content and CDN delivery, but in order to better serve our global customer base, we need a responsive presence (read: salesforce servers) close to them.  being on NA1, which I presume is hosted on the US west coast, hurts our ability to provide responsive apps to EMEA customers.

thanks for the quick followup.

vasvas

Hi Bulent,

Can you send me the javascript sample code to maintain the language preference for unauthenticated users?

 

Thanks much