Skip to Content
avatar image
Former Member

Reading iview personalization language in Web Dynpro java

HI

How can i read Iview personalization language in webdynpro java netweaver 7 enviroement?

WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-locale") is deprecated it seems.

regards

PG

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Jun 25, 2009 at 10:03 AM

    Hi Pranav,

    Try this code:

    String lang = WDClientUser.getLoggedInClientUser().getLocale().getDisplayLanguage();
    

    If the above code doed not give you correct values please try this as well:

    String lang = WDClientUser.getCurrentUser().getLocale().getDisplayLanguage();
    

    I hope this solves the issue. Please revert back if you do not get the corerct values.

    Thanks and Regards,

    Pravesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2009 at 10:15 AM

    Hi

    Thanks, but this doesn't solve the problem.

    Your solution is returning the user language, but iview language can also be personalized. I need to find iview personalization language.

    regards

    Pranav

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2009 at 12:04 PM

    Hi Prashant..

    Thanks for the information. But I might not need properties of PCD object.

    Every user sees the iview and changes the language by personalization. So the Language field is associated not only with PCD iview but also with the logged in user.

    Basically We require personalized Iview details, which might be found in request object. still not sure. 😊

    regards

    Pranav

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2009 at 01:43 PM

    Hi Pranav,

    Try using this code

    WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("sap-locale");

    Best Wishes

    Idhaya R

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 25, 2009 at 02:24 PM

    Hi

    i tried this as well, but there is no parameter with name 'sap-locale'.

    Thanks anyways..

    regards

    Pranav

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi..

      Problem was that sap-locale parameter was found only when iview was loaded for first time. to make use of language detail in action handler i stored it in context within init method. now my application is working.

      regards

      Pranav