In grails, is there a way in the i18n file to refer to a constant value. I am trying to do something like this:
constant.sitename=Fancy SiteName
intro.headline.label=Welcome to {constant.sitename}
home.headline=You're at {constant.sitename}
The reason is that I do not want to change the file name in each line, if we decided to change the name, I only want to do this once. Is there a way to fulfill this requirement?
I understand that I could also set a constant in Config.groovy, but then it would require passing in the parameter each individual message, which required that I would prefer not to do this, as this would make developers live worse.
Scott source
share