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

Error 406 No locales match the accepted languages

written-by

Julián Vela Cubas

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

Issue

  • When creating web content using POST, PUT, or PATCH API requests, an Error 406 is returned if no locales match the accepted languages:
{ "status": "NOT_ACCEPTABLE", "title": "No locales match the accepted languages: xx-XX" }

Environment

  • Liferay DXP 7.4+

Resolution

  • This behavior for POST, PUT, and PATCH is expected when the Accept-Language header does not match any of the languages configured in Liferay.

    To resolve this issue, you can either:

    • Add the desired language to the 'Current' configuration.
      Localization-Liferay-DXP.jpg

    • Set the Accept-Language header to one of the languages already configured:
      -H "Accept-Language: xx-XX"

 

Additional Information

 

 

did-this-article-resolve-your-issue

legacy-knowledge-base