legacy-knowledge-base
公開されました Sep. 10, 2025

言語オーバーライドを使用してカスタム開発から翻訳を変更する方法

written-by

Ricardo Couso

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

:この記事は内部の記事であり、現在、お客様にはご覧いただけません。 この記事へのリンクは社内のコメントでのみ行ってください。

問題

  • カスタム開発では通常、Language.propertiesや Language_fr.propertiesのようなファイルに言語キーと値を持ち異なる言語への翻訳をエンコードします。
  • Liferayは、製品内の多くのフレーズの翻訳を簡単に変更するための機能Language Overrideを提供しています。
  • カスタム開発の責任者は、Language_$locale.propertiesファイルで直接翻訳を変更することができますが、Language Override を活用してこのようなことが可能でしょうか?

環境

  • Liferay DXP 7.4

解像度

  • カスタム開発によるキーの翻訳を効果的に変更するには、次のことを確認してください:
    • bnd.bndファイルには次の行がある。
      Provide-Capability:♪
      liferay.language.resources;♪
      resource.bundle.base.name="content.Language"
    • ポートレットの@Componentアノテーションには、次のプロパティが含まれていません
      "javax.portlet.resource-bundle=content.Language"

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base