[midPoint] Synchronization with localization

Yakov Revyakin yrevyakin at gmail.com
Sun Dec 12 21:36:32 CET 2021


Oleksandr, thanks a lot. It works.
For followers,
Use square brackets for arrays in the script:

                                import com.evolveum.midpoint.util.MiscUtil;
                                import
com.evolveum.midpoint.prism.polystring.PolyString;

                                String USER_JACK_FULL_NAME = "Jack Sparrow";
                                String[] JACK_FULL_NAME_LANG_CZ_HR = [
                                    "cz", "Džek Sperou",
                                    "hr", "Ðek Sperou"
                                ];

                                PolyString fullname = new
PolyString(USER_JACK_FULL_NAME);

fullname.setLang(MiscUtil.paramsToMap(JACK_FULL_NAME_LANG_CZ_HR));

                                return fullname;



On Sun, 12 Dec 2021 at 11:06, Oleksandr Nekriach <o.nekriach at dynatech.lv>
wrote:

> Hi Яків,
> Try to user expression in mappings and code below to set alternative lang
>
> String USER_JACK_FULL_NAME = "Jack Sparrow";
>
> String[] JACK_FULL_NAME_LANG_CZ_HR = {
> "cz", "Džek Sperou",
> "hr", "Ðek Sperou"
> };
> PolyString fullname = new PolyString(USER_JACK_FULL_NAME);
> fullname.setLang(MiscUtil.paramsToMap(JACK_FULL_NAME_LANG_CZ_HR));
>
> On 11 Dec 2021, at 23:09, Yakov Revyakin via midPoint <
> midpoint at lists.evolveum.com> wrote:
>
> ru
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20211212/f5dcc9e4/attachment.htm>


More information about the midPoint mailing list