diff --git a/grails-app/i18n/messages_fr.properties b/grails-app/i18n/messages_fr.properties new file mode 100644 index 0000000..4d826a3 --- /dev/null +++ b/grails-app/i18n/messages_fr.properties @@ -0,0 +1 @@ +label = french \ No newline at end of file diff --git a/grails-app/services/grails/plugin/rendering/document/XhtmlDocumentService.groovy b/grails-app/services/grails/plugin/rendering/document/XhtmlDocumentService.groovy index 5bdaf92..b02750f 100644 --- a/grails-app/services/grails/plugin/rendering/document/XhtmlDocumentService.groovy +++ b/grails-app/services/grails/plugin/rendering/document/XhtmlDocumentService.groovy @@ -65,7 +65,7 @@ class XhtmlDocumentService { protected generateXhtml(Map args) { def xhtmlWriter = new StringWriter() - RenderEnvironment.with(grailsApplication.mainContext, xhtmlWriter) { + RenderEnvironment.with(grailsApplication.mainContext, xhtmlWriter, args.locale) { createTemplate(args).make(args.model).writeTo(xhtmlWriter) } diff --git a/grails-app/views/_simple.gsp b/grails-app/views/_simple.gsp index 95352cb..0566766 100644 --- a/grails-app/views/_simple.gsp +++ b/grails-app/views/_simple.gsp @@ -19,5 +19,6 @@
This is a PDF!
${var}
+Locale specific content: ${message(code: 'label')}