Plugins You can find out about all the publicly available Grails plugins.

Grails I18n Resources Plugin

  • Tags: i18n
  • Latest: 0.2
  • Last Updated: 17 September 2014
  • Grails version: 2.0 > *
  • Authors: Rahul Somasunderam, Dave Klein
0 vote
Dependency:
compile "org.grails.plugins:grails-i18n-resources:0.2"

 Documentation  Source  Issues

Summary

Serves up i18n bundle to javascript

Installation

compile ':grails-i18n-resources:0.2'

Description

Usage
  1. In your plugins section of `BuildConfig.groovy` add this
For use with the asset-pipeline plugin,

``` compile ":grails-i18n-resources:0.2" ```

2. In your `*Resources.groovy`, add dependency `i18n` to modules that need i18n. 3. In your page, you can setup a callback in which you can execute code like this

``` $.i18n.properties({ name: 'messages', path: '<g:resource dir="i18n/"/>', mode: 'map', callback: function() { // your code here }, cache: true }); ```

Take a look at jquery-i18n-properties (+)(https://code.google.com/p/jquery-i18n-properties/) for more on the syntax.