「Accept-Language」ヘッダーを使用して Web コンテンツを取得すると、異なる言語が返される
written-by
Sivakumar Perumal
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
問題
「Accept-Language」ヘッダーを使用してヘッドレス API を使用して Web コンテンツを取得すると、翻訳がある場合は選択した言語バリエーションが返されますが、それ以外の場合はデフォルトの言語バージョンが返されます。
curl -X GET "http://localhost:8080/o/headless-delivery/v1.0/content-structures/35030/structured-contents" -H "accept: application/json" -H "Accept-Language: hr-HR"