Wednesday, May 18, 2011

Grails i18N on google App Engine

Have this in BootStrap.groovy

import grails.util.Environment;

class BootStrap {
    def messageSource
    def init = { servletContext ->
        if( Environment.getCurrent() == Environment.PRODUCTION ){
            messageSource.basenames = [ 'WEB-INF/grails-app/i18n/messages' ]
            messageSource.clearCache()   
        }
    }
    def destroy = {
    }
}


Run these two commands to package and deploy



  1. grails -Dgrails.env=production app-engine package
  2. appcfg.sh update ./target/war

  

No comments:

Post a Comment