Question
Accenture
US
Last activity: 13 Nov 2015 0:17 EST
Locale changes to be reflected without logging off from the current session
Hi, i need to change the user locale dynamically and once the locale is changed the changes to be reflected right away, even without logging off from the current session. User is provided an option to switch between the locale, once the locale is changed, the property 'pyUseLocale' is updated in background and the screen is refreshed, but the changes are being reflected only when a particular user logoff and login back. Is there any other way this can be achived?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 28 Jul 2015 7:44 EDT
Below code was also run in Deepan's environment to get the locale switched but to no luck. This code successfully switches in inhouse system but not in his environment.
PRThread thread = tools.getThread();
try
{
thread.setLocaleName(PRThread.LOCALE_DEFAULT, "fr");
}
catch (InvalidLocaleException ilEx)
{
thread.getStepStatus().set(ProcessingStatus.SEVERITY_FAIL, "Invalid-Locale", ilEx.getMessage());
}
Pegasystems
US
The sorts of things I would check:
1) The ruleset lists in the clipboard. Are they being updated to refer to the new language properly ?
2) Are some changes happening perhaps only in one thread that are supposed to be requestor-wide ?
3) Do you have proper refresh mechanisms in place so your sections know to re-render all the field values using the updated ruleset lists ?
/Eric
Eric,
Response to your queries.
1) The ruleset lists in the clipboard. Are they being updated to refer to the new language properly ? -- Checked and the localised ruleset is on top of the stack
2) Are some changes happening perhaps only in one thread that are supposed to be requestor-wide ? -- I tried to set it at requestor wide but i know of no other mechanism than just resaving the operator record rule form with the updated locale. Did that no luck
3) Do you have proper refresh mechanisms in place so your sections know to re-render all the field values using the updated ruleset lists ? -- The refresh mechanisms we have is to refresh the section and the harness . .the standard OOTB way.
Pegasystems
US
>>> know of no other mechanism than just resaving the operator record rule form with the updated locale
I don't think saving the op record is the normal way to update the locale at runtime. There used to be an API to change the locale, and a system menu item and landing page to choose a locale. Can someone else please chime in here ? /Eric
Qbe Insurance
PH
I think you're referring to UI > Localization Tools > Locale Settings
This uses UpdateLocaleSettings activity to update the requestor's locale.
Pegasystems Inc.
IN
would an onClick event configured with Run script/activity to update requestor level locale setting on clipboard followed by Launch Harness - Replace current or Refresh work area section helps?
Hi Phani,
We had tried this at customer end but to no luck.
Any other thoughts.
Thanks,
Nishan
Pegasystems Inc.
IN
sorry Nisha, no idea. at least Java script associated at harness level should work. CPM & Pega Express uses java script to reload the screen [window.reload() or location.reload()]...
could you please try and share your observations, Thank you!