String language = event.getRequestContext().getRequestParameter("language");
PortalRequestContext prqCtx = PortalRequestContext.getCurrentInstance();
UIPortalApplication uiApp = Util.getUIPortalApplication();
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.createEvent("Close", Phase.DECODE, rContext).broadcast();
if (language == null || language.isEmpty() || language.trim().equals(prqCtx.getLocale().getLanguage())) {
// LocalizationLifecycle will save userProfile if locale is changed
// We need to handle case : locale is not changed, but user's locale setting has not been initialized
if (prqCtx.getRemoteUser() != null) {