Grails 2.3.8国际化编码字符串

时间:2015-01-25 17:01:13

标签: grails

我不明白为什么我的message.properties文件中的某些字符串不会显示在我的gsp中。更确切地说,该文件中的键名中不是。

例如,我的messages.properties中的这个字符串:

gtunes.store.subtitle=Your online music store and storage service!

出现在我拥有这行代码的gsp上:

<h1><g:message code='gtunes.store.subtitle'/></h1>

简单地说:

gtunes.store.subtitle

我的代码是here

1 个答案:

答案 0 :(得分:1)

我下载了您的应用,错误的原因是因为messages.properties中没有配置此密钥的消息。

如果您尝试为不存在的密钥呈现消息,则会显示该密钥。