<div dir="ltr">Oleksandr, thanks a lot. It works.<div>For followers,</div><div>Use square brackets for arrays in the script:</div><div><br></div><div>                                import com.evolveum.midpoint.util.MiscUtil;<br>                                import com.evolveum.midpoint.prism.polystring.PolyString;<br><br>                                String USER_JACK_FULL_NAME = "Jack Sparrow";<br>                                String[] JACK_FULL_NAME_LANG_CZ_HR = [<br>                                    "cz", "Džek Sperou",<br>                                    "hr", "Ðek Sperou"<br>                                ];<br><br>                                PolyString fullname = new PolyString(USER_JACK_FULL_NAME);<br>                                fullname.setLang(MiscUtil.paramsToMap(JACK_FULL_NAME_LANG_CZ_HR));<br><br>                                return fullname;<br></div><div><span style="color:rgb(32,33,36);font-size:0.875rem;font-weight:bold;letter-spacing:0.2px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;white-space:nowrap"><br></span></div><div><span style="color:rgb(32,33,36);font-size:0.875rem;font-weight:bold;letter-spacing:0.2px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;white-space:nowrap"> </span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 12 Dec 2021 at 11:06, Oleksandr Nekriach <<a href="mailto:o.nekriach@dynatech.lv">o.nekriach@dynatech.lv</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
<div>Hi Яків,</div>
<div>Try to user expression in mappings and code below to set alternative lang</div>
<div><span><br>
</span></div>
<div>
<div><font face="Big Caslon">String USER_JACK_FULL_NAME = "Jack Sparrow";</font></div>
<div><font face="Big Caslon"><br>
</font></div>
<div><font face="Big Caslon">String[] JACK_FULL_NAME_LANG_CZ_HR = {</font></div>
<div><font face="Big Caslon">"cz", "Džek Sperou",</font></div>
<div><font face="Big Caslon">"hr", "Ðek Sperou"</font></div>
<div><font face="Big Caslon">};</font></div>
<div><font face="Big Caslon">PolyString fullname = new PolyString(USER_JACK_FULL_NAME);</font></div>
<div><font face="Big Caslon">fullname.setLang(MiscUtil.paramsToMap(JACK_FULL_NAME_LANG_CZ_HR));</font></div>
</div>
<div><br>
<blockquote type="cite">
<div>On 11 Dec 2021, at 23:09, Yakov Revyakin via midPoint <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>> wrote:</div>
<br>
<div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">ru</span></div>
</blockquote>
</div>
<br>
</div>

</blockquote></div>