Writes a value from the current localization bundle given its key. Writes the value with proper escaping based on the context of the tag.
Any number of "arg###" attributes may be provided, where ### is the substitution
parameter index, starting at zero.
For example, there could be arg0="First" arg1="Second"
for two arguments.
They will be passed-on to the message format.
Additionally, message substitution arguments may be provided by nested <ao:messageArg> tags.
These additional arguments will first fill-in any gap in the numeric ranges
provided by "arg###" attributes. Because the first argument is zero, if
arg1="Second" arg2="Third"
, then the first nested
<ao:messageArg>
would be applied filling the spot of arg0
.
Once all gaps are filled, these additional arguments will be added after all provided as "arg###" attritutes.
This tag must be nested inside a <ao:bundle> tag.
The content type depends on the value provided to the type attribute, and defaults to text/plain
.
The content is checked for well-formedness based on its type:
css
ortext/css
- must be well-formed CSS content. (Note: Currently only checks character values.)javascript
,application/javascript
, ortext/javascript
- no validationjson
orapplication/json
- no validationld_json
orapplication/ld+json
- no validationtext
ortext/plain
- no validationurl
ortext/url
- must be a valid URLxhtml
orapplication/xhtml+xml
- must be well-formed XHTML content. (Note: Currently only checks character values.)xhtml_attribute
orapplication/xhtml+xml+attribute
- must be a valid XHTML attribute.mysql
ortext/x+mysql
- must be valid MySQL command "mysql" inputpsql
ortext/x+psql
- must be valid PostgreSQL command "psql" inputsh
ortext/x+sh
- must be valid shell script
Tag Information
Tag Class: | com.aoapps.taglib.legacy.MessageTag |
---|---|
TagExtraInfo Class: | com.aoapps.taglib.MessageTagTEI |
Body Content: | JSP |
Display Name: | None |
Dynamic Attributes: | true |
Attributes
Name | Required | Evaluation | Type | Description |
---|---|---|---|---|
bundle | No | Runtime | String |
The base name of resource bundle to access. When not provided, uses the currently active <ao:bundle>. |
key | Yes | Runtime | String |
The key to lookup in the bundle. This key is appended to any prefix specified in the bundle. |
arg0 | No | Runtime | Object |
The argument that will replace Any number of arguments may be provided as attributes. The first four are added to TLD to help JSP code assist. |
arg1 | No | Runtime | Object |
The argument that will replace Any number of arguments may be provided as attributes. The first four are added to TLD to help JSP code assist. |
arg2 | No | Runtime | Object |
The argument that will replace Any number of arguments may be provided as attributes. The first four are added to TLD to help JSP code assist. |
arg3 | No | Runtime | Object |
The argument that will replace Any number of arguments may be provided as attributes. The first four are added to TLD to help JSP code assist. |
type | No | Runtime | Object |
Specifies the type of content contained in the value.
Defaults to |