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

Language Keys are processed as Literal Text in custom MVC Portlets

投稿者

Michael Tran

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • When creating a MVC Portlet that leverages language keys, language key output is presenting as the literal text, rather than the key value
  • For example: 
    • Language key in view.jsp:
      • <b><liferay-ui:message key="languagekeys.caption"/></b> 
    • Language Key Value in language.properties:
      • languagekeys.caption=Hello from LanguageKeys!
    • Expected Output: "Hello from LanguageKeys!"
    • Actual Output: Languagekeys.caption

Environment

  • Liferay 2024.Q1.12
  • Liferay Workspace

Resolution

  • This issue has been verified on lower versions of Liferay Workspace
  • Updating Liferay Workspace to the most recent version (for example: 10.1.9) and rebuilding the modules may resolve the issue
  • To check if the correct fix is applied, check if the following "Provide-Capability" section is added to the bnd.bnd file
  • Bundle-Name: Test2Portlet
    Bundle-SymbolicName: test2portlet
    Bundle-Version: 1.0.0
    Export-Package: test2portlet.constants

    Provide-Capability:\
    liferay.language.resources;\
    resource.bundle.base.name="content.Language"

Additional Information

 

 

 

 

did-this-article-resolve-your-issue

legacy-knowledge-base