Skip to Content
0
Former Member
May 16, 2008 at 12:37 PM

how to get user language in property renderer without web dynpro (java)

24 Views

Hi all,

how can I get the language of the current user?

Normally I got it with:

IWDClientUser wdClientUser = WDClientUser.getCurrentUser();

com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();

IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);

IResourceContext resourceContext = new ResourceContext(ep5User);

String strUserLanguage = resourceContext.getLocale().getLanguage();

But this only works in web dynpro applications. Now I need to get the language in my own property renderer. The code throws:

com.sap.tc.webdynpro.services.sal.um.api.WDUMException: No client user defined for the current request (no regular Web Dynpro request as ITask is null.

Thanks a lot

Steffi