7 Internationalization i18n - Reference Documentation
Authors: Grails Plugin Consortium
Version: 2.4.4
7 Internationalization i18n
Internationalization (i18n)
The following keys are supported in message bundles for internationalizing the text in the plugin.Filter Operators
- fp.op.ILike
- fp.op.NotILike
- fp.op.Like
- fp.op.NotLike
- fp.op.Equal
- fp.op.NotEqual
- fp.op.IsNull
- fp.op.IsNotNull
- fp.op.GreaterThan
- fp.op.GreaterThanEquals
- fp.op.LessThan
- fp.op.LessThanEquals
- fp.op.Between
Property Name Display
By default, each property's natural name is displayed. There are two ways to localize the name of the properties:- Use keys of the form:
fp.property.text.propertyName, wherepropertynameis the domain property name. For associated properties, use keys of the form:fp.property.text.associatedBean.propertyName. - If you want different labels for different domain classes where you use the filter you need to use keys of the form:
domainClassName.propertyName, wheredomainClassNameis the name of the domain class with a lower case leading character andpropertynameis the domain property name. Example:myDomain.myProperty.
Select input form values
There are three ways to localize the values of a select input form, which is used for enum values, lists etc.:- By supplying your own
valueMessagePrefixin thefilterPropertyValuesattribute in thefilterPanetag. This way you may use the formyourValueMessagePrefix.optionIdthe same way as in theg:selecttag. - On the form
domainClassName.propertyName.optionId. If you use this alternative, you also need to label your propertyName on the formdomainClassName.propertyNameas described above. - On the form
fp.property.text.propertyName.optionId. If you use this alternative, you also need to label your propertyName on the formfp.property.text.propertyNameas described above.
Filter Button Tag
If no textKey or appliedTextKey attributes are given, the default keys are checked.- fp.tag.filterButton.text
- fp.tag.filterButton.appliedText
Filter Pane Tag
The filterPane tag's keys are listed below, along with their default values for clarity.- fp.tag.filterPane.titleText=Filter
- fp.tag.filterPane.property.boolean.true=Yes
- fp.tag.filterPane.property.boolean.false=No
- fp.tag.filterPane.property.betweenValueSeparatorText=and
- fp.tag.filterPane.sort.orderByText=Order by
- fp.tag.filterPane.sort.noSelection.text=Select a Property
- fp.tag.filterPane.sort.ascending=Ascending
- fp.tag.filterPane.sort.descending=Descending
- fp.tag.filterPane.button.cancel.text=Cancel
- fp.tag.filterPane.button.clear.text=Clear
- fp.tag.filterPane.button.apply.text=Apply
The full default message bundle can be found in the installed plugin's folder in the messages-filterpane.properties file.The plugin supports the i18n Templates plugin's domain property format:
<domainClass>.<property> <-- for each property