Hello,
Regrettably, there is no handler available in the current version of Kentico CMS.
You can, however, store the current culture the the session and each time the page is posted back to the server check whether the culture has been changed by comparing the current culture with the one retrieved from the session. The code could look like the following one:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
bool changed = false;
string previousCulture = ValidationHelper.GetString( SessionHelper.GetValue("culture"), String.Empty);
string currentCulture = CMSContext.CurrentDocument.DocumentCulture;
if (previousCulture != String.Empty)
{
if (previousCulture != currentCulture)
{
changed = true;
}
}
SessionHelper.SetValue("culture", currentCulture);
if (changed)
{
// do something
}
}
Best regards,
Michal Legen