Grails 2.3.8 国际化编码字符串

Grails 2.3.8 Internationalization coded strings

我不明白为什么我的 messages.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.

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

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