Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.17 KB

attribute.adoc

File metadata and controls

47 lines (29 loc) · 1.17 KB

Attribute formatter

Instead of using string value of a parameter, the attribute formatters use the value of an attribute with a specified name. For more information on attributes, see here.

Attribute value

Inserts the value of the attribute wiht the given name and locale.

Value for FORMAT_TYPE: attr-NAME, where NAME is the name of the attribute.

The first value of FORMAT_STYLE is used when the parameter value or attribute value is null. It must be enclosed with curly braces: {…​}.

Example:

It has the color {0, attr-color, {none}}

Attribute select

It works like the select formatter, but uses the value of the attribute for the select.

Value for FORMAT_TYPE: attr:NAME, where NAME is the name of the attribute.

Definition for FORMAT_STYLE is the same as for the select formatter.

Example:

{0} has forgotten {0, attr:gender, female {her} male {his} other {its} } bag.

Back to Formatters