Now that you have an idea of locales, to take advantage of them in Grails you have to create message bundles that contain the different languages that you wish to render. Message bundles in Grails are located inside the
grails-app/i18n
directory and are simple Java properties files.
Each bundle starts with the name
messages
by convention and ends with the locale. Grails ships with a bunch of built in message bundles for a whole range of languages within the
grails-app/i18n
directory. For example:
messages.properties
messages_de.properties
messages_es.properties
etc.
By default Grails will look in
messages.properties
for messages, unless the user has specified a custom locale. You can create your own message bundle by simply creating a new properties file that ends with the locale you are interested. For example
messages_en_GB.properties
for British English.