I am trying to add some additional values into the i18n messageSource in Grails.
The default message.properties work fine but I need some additional values loaded from a remote resource (I know it is not good, but you know, managements... ).
I am trying to load these variables through the Boostrap.groovy example:
def messageSource = new StaticMessageSource()
messageSource.addMessage("key1", new Locale("en"), "English Value")
messageSource.addMessage("key2", new Locale("de"), "Other Language Value")
When I try to access them in any GSP via the
<g:message code="key1" />
only the key is returned, as if the values where not set at all at the StaticMessageSource. Apparently I am not having much luck with the documentation.
There is nothing on the Grails website and almost nothing on the SpringFramework. Will appreciate any suggestions.
Anyother way to add the a set of messages to the messageSource Session!?