Yes, I have tried in different browsers and cookies are enabled. This is the exact cookie isn't it?:
CookieHelper.GetValue("CMSPreferredCulture")
As soon as I go to a page that isn't translated, that cookie changes to the default language. Translated pages are then displayed in the default language even if they are translated. I am running v7.0.34.
I did find a work around. As soon as the user selects the language they want, I store that value in my own cookie. I then set my cookie as the culture on every page load. This change appears to have fixed the problem. To help anyone else having the same problem, here is my exact code:
protected void Page_PreRender(Object sender, EventArgs e)
{
//We are going to keep track of the selected language ourselves
if (!String.IsNullOrEmpty(Request["lang"]))
{
CookieHelper.SetValue("SELECTEDCULTURE", Request["lang"].ToString(), DateTime.Now.AddDays(1));
CMS.GlobalHelper.CultureHelper.SetPreferredUICulture(Request["lang"].ToString());
}
setCulture();
}
public void setCulture() {
//get the selected culture in our cookie. default to the default culture.
string currentCulture = (CookieHelper.GetValue("SELECTEDCULTURE") == null ? "en-US" : CookieHelper.GetValue("SELECTEDCULTURE").ToString());
//change every Kentico culture variable we can
repSubItems.CultureCode = currentCulture;
CMSRepeater1.CultureCode = currentCulture;
Page.Culture = currentCulture;
CMSContext.CurrentDocument.DocumentCulture = currentCulture;
CookieHelper.SetValue("CMSPreferredCulture", currentCulture, DateTime.Now.AddDays(3));
CultureHelper.SetPreferredCulture(currentCulture);
}