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

  • Using sp:message tag and MessageFormat in resource bundle

    Hello,

    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="fmt.date" arguments="${person.dateDeactivated}" />

    Until there, I think everything is ok. My main doubt is how I must declare the "fmt.date" attribute in my message bundle file. I'm trying to do the following, but it's not working:

    fmt.date={0,MM/dd/yyyy}

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

    Thanks.

    Mauricio
Working...
X