Number of the parameter which values is matched against the values of the select list
DECLENSION_FORM
*Name of the declension form. The value of the parameter should be transformed to this declension form.
In many cases the declension form can be built on general rules. For this cases for regular declension pattern should be provided per locale. If the declension-provider does not return a declined value, this pattern should be used to build a regular declension form of the parameter value. E.g. for the German "genitive" it would be {0}{0, gender, m/n: {0, grammatical-number, one: s | ? } | ? }
A general declension-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).
Example:
HIGH_RISK_OF
en: The risk of a {0} is high.
de: Das Risiko eines {0, declension, genitive } ist groß.
HIGH_RISK_OF( STORM )
en: The risk of a storm is high.
de: Das Risiko eines Sturms ist groß.
HIGH_RISK_OF( SPARK )
en: The risk of a spark is high.
de: Das Risiko eines Funkens ist groß.
These subjects-strings should be defined in a separate MessageBundle where also the declension-form attribute is defined. The value of "DECLENSION_FORM" is the name of the attribute that is looked up.
For files storing the attribute, the name of the attribute is appended as extension after the locale tag via “-x-attr-declension-NAME“
For languages that have irregular declension, a declension-provider is needed to find the declined form of a word.
Format:
{ PARAMETER_NUMBER, declension-DECLENSION_FORM, DEFAULT_VALUE }
PARAMETER_NUMBER
DECLENSION_FORM
*Name of the declension form. The value of the parameter should be transformed to this declension form.In many cases the declension form can be built on general rules. For this cases for regular declension pattern should be provided per locale. If the declension-provider does not return a declined value, this pattern should be used to build a regular declension form of the parameter value. E.g. for the German "genitive" it would be
{0}{0, gender, m/n: {0, grammatical-number, one: s | ? } | ? }
A general declension-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).Example:
HIGH_RISK_OF
The risk of a {0} is high.
Das Risiko eines {0, declension, genitive } ist groß.
HIGH_RISK_OF( STORM )
The risk of a storm is high.
Das Risiko eines Sturms ist groß.
HIGH_RISK_OF( SPARK )
The risk of a spark is high.
Das Risiko eines Funkens ist groß.
These subjects-strings should be defined in a separate
MessageBundle
where also the declension-form attribute is defined. The value of "DECLENSION_FORM" is the name of the attribute that is looked up.For files storing the attribute, the name of the attribute is appended as extension after the locale tag via “-x-attr-declension-NAME“
subjects_en.properties
No declension for English.
subjects_de.properties
subjects_de_-x-attr-declension-genitive.properties
(“Sturm” has regular declension and doesn’t need a declension entry.)