on 10-15-2006 5:56 PM
Hi all,
I have a specific requirement to develope using Webdynpro. I want to programically change the default language of a selected user. Could some one help me . I promise to award points for the solution.
Thank you in advance
Regards
Maruti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maruthi,
This code may be helpful for you.
//UID is Unique ID of the user
String UID = "USER.PRIVATE_DATASOURCE.un:ttmdp1";
IUserMaint us = UMFactory.getUserFactory().getMutableUser(UID);
//Setting the Language
us.setLocale(Locale.ENGLISH);
us.save();
us.commit();
//Checking
IUserMaint us1 = UMFactory.getUserFactory().getMutableUser(UID);
response.write("Lang "+us1.getLocale());
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar,
Thank you for your mail. I have tried your code but its is not working for me. I wanted to set the language to Italin and it don't giv eme the result. Could you please clarigy me ?
us.setLocale(Locale.ITALIAN);
In UME I have created user text4 with default language English and want to change to Italian trough WebDynpro program.
My Code is:
-
String Uid = "USER.PRIVATE_DATASOURCE.un:test4";
IUserMaint us = UMFactory.getUserFactory().getMutableUser(Uid);
us.setLocale(Locale.ITALIAN);
us.save();
us.commit();
// Checking
IUserMaint us1 = UMFactory.getUserFactor().getMutableUser(Uid);
msgMgr.reportSuccess("new Lang "+us1.getLocale());
Could you please clarify me where I am going wrong?
Thank you in adavance
Regards
Maruti
Hi Sridhar,
Thank you for your reply. I think the user I am using to Deploy WD programs does not have rights/permissions to update language settings through WD program .Thats what I am thinking. Do you have any idea whats are the permissions required for SDM user to automatically change the settings?
Any way Thank you for your reply.
Regards
Maruti
Hi Maruti,
I guess, Locale supports for few Languages.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.