0
votes

I have a grails project where i have a database table containing all multilanguage contents. They are read using message source tags(inside gsp file) or bean (inside service classes) wherever needed. Now, In addition to locale I need to specify the format in which data needs to be read in that locale. The format is also stored in the same table. Now, the issue is how do i specify data format in message source tag or bean call?

This is basic message source tag

<g:message code="email-label" args="${['param1', 'param2']}"/>. 

Now, in addition to code and args parameter, i need to specify data format. But, there is no such parameter allowed in message source in grails. Any solution to this? Same applies to messageSource bean created that is used in services classes to get multilanguage strings for attributes.

1

1 Answers

0
votes

I think you can specify locale only for format* tags. To do what you want you are going to need to implement/override the default message tag