Message Gender Select Formatter
It is like a normal select-pattern (#36), but instead of using the value of the parameter directly, the value is passed to a gender-provider that returns the gender of the parameter value.
Predefined return values of the gender-provider
m: masculine
f: feminine
n: neuter
c: common
u: unknown/undefined
The gender-provider may also return other values for currently unconsidered cases.
Example:
FORGOTTEN_BAG = The {0} has forgotten {0, gender, m {his} f {her} other {its}) bag.
FORGOTTEN_BAG("boy") -> The boy has forgotten his bag.A general purpose gender-provider may be based on large directories. But this is an extensive task. Therefor the default implementation will use the attributes of the LocalizedString (#43), like the “attr-select-pattern”. So the example above would be written as
FORGOTTEN_BAG( BOY )
These subjects-string should be defined in a separate MessageBundle where also the “gender” attribute is defined, e.g.
subjects_en.properties
boy=boy
girl=girl
child=childsubjects_en_-x-attr-gender.properties
boy=m
girl=f
child=n