legacy-knowledge-base
公開されました Jun. 30, 2025

タグライブラリ liferay-ui:message を使用した翻訳が見つかりません。

written-by

Daniel Martinez Cisneros

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • カスタムモジュールでliferay:ui message taglibを使用しようとすると、Language.propertiesで指定されたキーが使用されません。
  • view.jsp
    <liferay-ui:message key="test.caption"/>
  • Language.properties
    test.caption=label translated 
  • レンダリングされたラベル:
    • 期待値:翻訳されたラベル
    • 現在:test.caption

環境

  • 2024.Q1

解決

この問題を解決するには2つの方法があります:

  • Languages Override  セクションにキーを追加すると、見つかったキーが置き換えられ、カスタムモジュールで追加されたすべてのロケールが優先されます。
  • カスタム・モジュールのbnd.bndファイルを修正し、追加します:
    Provide-Capability:\
    liferay.language.resources;\
    resource.bundle.base.name="content.Language"

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base