grails - How to change the default message.properties -
let's have following line of code:
<p> <g:message code="nav.usuario.show" /> </p> if using italian computer, grails @ messages_it.properties first. if grails desn't find nav.usuario.show=textlabel there, try find in messages.properties. want change behavior at message_es.properties instead default messages.properties (but only if label not in current locale language)
i tried following code, didn't see change. resources.groovy:
beans = { localeresolver(org.springframework.web.servlet.i18n.sessionlocaleresolver) { defaultlocale = new locale("it","") java.util.locale.setdefault(defaultlocale) } }
simply copy code of language want default (for example messages_es.properties) default messages.properties file.
if want keep english language, have create new file name messages_en.properties. move code of messages.properties there.
Comments
Post a Comment