grails 列出i18n内容
在gsp页面中增加以下代码
<body><g:eachin="${grailsApplication.domainClasses}"var="dc">##--------------${dc.logicalPropertyName}-----------------------<br/><g:eachin="${dc.properties?.sort{it.name}}"var="f"status="i"><%defpropLabel=dc.logicalPropertyName+"."+f.name+".label"defpropI18n=message(message:propLabel)%><g:iftest="${i==0}"><%defdomainLabel=dc.logicalPropertyName+".label"defdomainI18n=message(message:domainLabel)%>${domainLabel}=${domainI18n.equals(domainLabel)?'':domainI18n}<br/></g:if><g:iftest="${!'version'.equals(f.name)}">${propLabel}=${propI18n.equals(propLabel)?'':propI18n}<br/></g:if></g:each><br/></g:each></body>
会列出所有的字段,以及i18n对比
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。