我的portlet定义了一些包含文本标签“category”和“abbreviation”的GUI元素:
[...]
<liferay-ui:search-container-column-text
name="category"
property="category"
/>
<liferay-ui:search-container-column-text
name="abbreviation"
property="abbreviation"
/>
[...]
在Web浏览器中呈现时,“类别”显示为“类别”(可能是因为Liferay门户将该词用作其核心),这很棒,但“缩写”保持小写,因此我created a new file WEB-INF/src/content/Language.properties
包含此内容:
abbreviation=Abbrevation
问题:即使重建并重新启动服务器,“缩写”仍然显示为小写。 Liferay似乎没有考虑我的portlet Language.properties
。
问题:我的问题可能是什么?我忘记了什么?
答案 0 :(得分:2)
检查portlet.xml
,portlet
节点内应该有这个:
<resource-bundle>content.Language</resource-bundle>
如果你找不到它,我们可能发现了你的问题(至少你有一个问题)!
此行告诉portlet在核心文件之前搜索自定义语言键的文件。