Announcement Announcement Module
No announcement yet.
Using sp:message tag and MessageFormat in resource bundle Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using sp:message tag and MessageFormat in resource bundle


    I'm using sp:message tag in my jsp to present a internationalizated date format to the user. I mean, the date format that comes from de database is yyyymmdd hh:mm, and I'd like to convert it to a format according to user's locale. For instance, a user which locale is US would see it in this format: "MM/dd/yyyy", and a user from Brazil would see in this one: "dd/MM/yyyy".

    For that, my jsp has:

    <sp:message code="" arguments="${person.dateDeactivated}" />

    Until there, I think everything is ok. My main doubt is how I must declare the "" attribute in my message bundle file. I'm trying to do the following, but it's not working:{0,MM/dd/yyyy}

    Could anybody help me with this? What would be the correct form of this declaration?