(Quick Reference)

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:
  1. Use keys of the form: fp.property.text.propertyName, where propertyname is the domain property name. For associated properties, use keys of the form: fp.property.text.associatedBean.propertyName.
  2. If you want different labels for different domain classes where you use the filter you need to use keys of the form: domainClassName.propertyName, where domainClassName is the name of the domain class with a lower case leading character and propertyname is 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.:
  1. By supplying your own valueMessagePrefix in the filterPropertyValues attribute in the filterPane tag. This way you may use the form yourValueMessagePrefix.optionId the same way as in the g:select tag.
  2. On the form domainClassName.propertyName.optionId. If you use this alternative, you also need to label your propertyName on the form domainClassName.propertyName as described above.
  3. On the form fp.property.text.propertyName.optionId. If you use this alternative, you also need to label your propertyName on the form fp.property.text.propertyName as 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