on 05-24-2011 5:19 PM
Hey
I need to change the language of the user in the portal , using two small links , EN | PT if the user clicks EN the browser language will be EN_US else pt_PT how can i do something like this?
i'm looking for javascript solution mainly or anything else related to sap. thanks
Hi,
String user = null;
try {
user =
WDClientUser
.getCurrentUser()
.getSAPUser()
.getUniqueName();
} catch (WDUMException e) {
// fpm.getMessageManager().raiseException(wdThis.wdGetAPI().getComponent(), e);
}
try{
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("user"+user);
IUserFactory userfact = UMFactory.getUserFactory();
IUserMaint userMaint = userfact.getMutableUser(user);
userMaint.setLocale(Locale.FRENCH);
userMaint.commit();
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("success");
}catch(Exception e){
}
Hope this code helps you.
Cheers-
Pramod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Im still looking for a answer to this problem if anyone have done something similar before.
ive been looking at ume.logon.locale but it seems the user languague and browser preferences overwrite this.
im also looking at HTTP Accept-Languague and how to change this but no solution found yet.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
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.