@groovy.transform.CompileStatic class GrailsI18nOptions extends java.lang.Object implements java.io.Serializable
Message-bundle options, configured through the nested grails { i18n { }} block:
grails {
i18n {
basenames = ['api', 'api_errors']
}
} | Type | Name and description |
|---|---|
ListProperty<java.lang.String> |
basenamesBase names to treat as declared rather than inferred from file names under grails-app/i18n. |
| Constructor and description |
|---|
GrailsI18nOptions(ObjectFactory objects) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Base names to treat as declared rather than inferred from file names under
grails-app/i18n.
Only needed where the file names are ambiguous. A trailing valid locale identifier is read
as a locale suffix, so api_fr.properties is taken to be base name api in
French; and a file that looks like a mistyped locale variant of an existing base name — such as
api_errors.properties alongside api.properties — fails the build rather than
being silently accepted as a separate bundle. Declaring the base name resolves either case:
grails { i18n { basenames = ['api', 'api_errors'] } }
Bundles outside grails-app/i18n are not indexed at all; configure those through
spring.messages.basename in the application's configuration.