Skip to Content

Date in Masthead

Hi all,

I want to add a date in a Welcome area.

I know that I need to modify the HeaderIview.jsp but I don't know How to read the language selected in the personalization area in order to display the date in the correct lenguage.

Thanks !

Ignacio.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 05, 2005 at 02:05 PM

    Hi Ignacio,

    within the JSP, you can access the implicit variable componentRequest (which is of class type IPortalComponentRequest). On this, you can call <i>getLocale()</i>. From here on, everything should be straight forward.

    Also see http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/runtime/com/sapportals/portal/prt/component/IPortalComponentRequest.html#getLocale()

    Hope it helps

    Detlev

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 05, 2005 at 02:10 PM

    Hey: This might give u some idea..

    portalapp.xml with a custom ResourceBundleName

    <component-config>

    <property name ="ResourceBundleName" value = "simple"/>

    </component>

    //private/classes/simple_en.properties

    title = english title

    //private/classes/simple_de.properties

    title = Deutscher Titel

    java.util.ResourceBundle resource = request.getResourceBundle();
    response.write(resource.getString("title"));

    Also, Look into getLocale();

    Regards,

    P.

    Message was edited by: Peter

    Add comment
    10|10000 characters needed characters exceeded