Internationalization Custom Actions
<ora:getLocalDate>
The
<ora:getLocalDate>
action
writes the specified date, formatted according to the currently
selected locale (see <ora:useLocaleBundle>
),
to the current JspWriter
. The attributes supported
by this particular action are described in Table 3.10.
Table C-10. <ora:getLocalDate> Attributes
Attribute Name |
Java Type |
Request-TimeValue Accepted |
Description |
---|---|---|---|
date |
java.util.Date |
Yes |
Mandatory. The date to format. |
name |
String |
No |
Mandatory. The name of the |
Example:
<%-- Create a LocaleBean (see <ora:useLocaleBean> for details. --%> <ora:useLocaleBean id="locale" bundleName="poll" supportedLangs="en, sv, de" /> <%-- Add a localized date to the response body. --%> <ora:getLocalDate name="locale" date="<%= new java.util.Date( ) %>" />
<ora:getLocalNumber>
The
<ora:getLocalNumber>
action writes the
specified number, formatted according to the currently selected
locale (see <ora:useLocaleBundle>
), to the
current JspWriter
. The attributes supported by
this action are described in Table 3.11.
Table C-11. <ora:getLocalNumber> Attributes
Attribute Name |
Java Type |
Request-TimeValue Accepted |
Description |
---|---|---|---|
name |
String |
No |
Mandatory. The name of the |
value |
double |
Yes |
Mandatory. The number to format. |
Example:
<%-- Create a LocaleBean (see <ora:useLocaleBean> for details). --%> <ora:useLocaleBean id="locale" bundleName="poll" supportedLangs="en, sv, ...
Get Java Server Pages now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.