如何为我的 portlet 安装新的 liferay-ui:message 键以在 Liferay 6.0.6 中使用?
我有f.在我的 JSP 中:
<liferay-ui:message key="my-own-message-key" />
但是当呈现 JSP 时,我看到“我自己的消息密钥”,而我期望的是“我自己的消息密钥”。我已经尝试过此处和重写中描述的方法Language.properties Liferay 开发人员指南的文件部分。
I have the ff. in my JSP:
<liferay-ui:message key="my-own-message-key" />
But when the JSP is rendered, I see "my-own-message-key" where I expect "My own message key." I have already tried the method described here and in the Overriding a Language.properties File section of the Liferay Developer's Guide.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
遵循 Liferay 开发人员指南的覆盖 Language.properties 文件部分。但这一次,手动将我的 Language-ext_xx_YY.properties 复制到 portlet 的类路径中(例如,docroot/WEB-INF/classes/content/Language-ext_xx_YY.properties),以便 Liferay 在运行时可以找到它。也许它第一次不起作用,因为 Liferay IDE 没有在构建时自动复制它。
Followed Overriding a Language.properties File section of the Liferay Developer's Guide. But this time, manually copied my Language-ext_xx_YY.properties into the portlet's classpath (e.g., docroot/WEB-INF/classes/content/Language-ext_xx_YY.properties) so it can be found by Liferay during runtime. Maybe it didn't work the first time because the Liferay IDE didn't copy it over automatically on build.