cancel
Showing results for 
Search instead for 
Did you mean: 

Using UME API and set language for user

Former Member
0 Kudos

Hello all,

I would like to use UME API andd UserFactory to set the language for user...

Do you have some examples for english, spanish, french ?

Thanks a lot

regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member182374
Active Contributor
0 Kudos

Hi Aurélien HENRY,

// You can get the 'UID' from the IUser object (unique name or unique id or hard code it)
String UID = "USER.CORP_LDAP.omcohen"; 
IUserMaint us = UMFactory.getUserFactory().getMutableUser(UID);
//Setting the Language
us.setLocale(Locale.ENGLISH); // For English
us.setLocale(new Locale("iw")); // For Hebrew
us.save();
us.commit();

//Checking 
IUserMaint us1 = UMFactory.getUserFactory().getMutableUser(UID);
response.write("Lang "+us1.getLocale()); 

Regards,

Omri

Answers (0)