views:

21

answers:

1

In a grails GSP, I want a toolTip to be localized:

<a href="..." title="localizedMessage">

As the toolTip is written in the attribute title, I can't use <g:message> here. Actually I already have a service for localized messages, but when I call it from the GSP, the service's messageSource is null, so getting that to work would be a solution as well.

+2  A: 

You can invoke the tag directly:

<a href="..." title="${message(code:'your.localized.message.code')}">

I think this should work too:

<a href="..." title="${g.message(code:'your.localized.message.code')}">
Daniel Engmann
Worked, thank you!
werner5471