cancel
Showing results for 
Search instead for 
Did you mean: 

Browser Language

Former Member
0 Kudos

Hi,

How to find browser language using WebDynpro Code?

Please note: Its Browser Language, not Portal lang.

Thanks

V.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vinod,

Have you tried this...

WDClientUser.getCurrentUser().getLocale().getDisplayLanguage();

Regards,

Saleem

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vinod

getDisplayLanguage() return you a language of the Locale, not always is the browser language, if the browser locale is default, it return the browser language. But locale could be configured in your application.

There is a request Header in Http Header of your page called Accept-Language. You can get all the accepted languages congured in your browser.

I don't know how can you get this in web dynpro. In a servlet you'd do in this way request.getHeader("Accept-Language");

Regards

Marcos

Edited by: Marcos Brandao on Jun 26, 2009 10:07 AM

Former Member
0 Kudos

Hi Vinod,

the way I see is to write a portal service in which you can select the browser language.

Call this service then in WD.

regards

Gunter