Support Article
Radio buttons are not localised in specified language.
SA-6812
Summary
Radio buttons are not localised in specified language.
Error Messages
N/A
Steps to Reproduce
Radio buttons are not localised in specified language.
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules.In pyTwpradioButtons rule caption labels are not localized.
Resolution
This issue is resolved through the following local change:
The pyTwoRadioButtons control is a available rule. So customer can save as this control to custom ruleset and add below code to get localized caption for radio button
Below is the local change for getting the label value to be localized.
pyTwoRadioButtons :
------------------------------
<pega:save name="strValue" ref="$this-value" />
<%
String firstCaption = tools.getLocalizedTextForString(".pyCaption",tools.getParamValue("FirstCaption"));
String secondCaption= tools.getLocalizedTextForString(".pyCaption",tools.getParamValue("SecondCaption"));
%>
<input type="radio" name="<p:r n='$THIS-NAME' />" value='<p:r n="param.FirstValue"/>' class="Radio"
<pega:when java='<%= tools.getSaveValue("strValue").equalsIgnoreCase(tools.getParamValue("FirstValue"))%>'> checked="checked" </pega:when> /> <%=firstCaption %> <br />
<input type="radio" name="<p:r n='$THIS-NAME' />" value='<p:r n="param.SecondValue"/>' class="Radio"
<pega:when java='<%= tools.getSaveValue("strValue").equalsIgnoreCase(tools.getParamValue("SecondValue"))%>'> checked="checked" </pega:when> /> <%=secondCaption %>
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.