I want to know all the language copies available or created for a particular page.
say, a particular page are in two different languages french and dutch.
if i select french page , how can i know programmatically know that dutch copy of this page also exist?
Solved! Go to Solution.
Hi
You can make use of "PageInfo" servlet to obtain page information in JSON format.
Example:- http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=/content/geometrixx/
It will return JSON values,
Link:-
"languages":{
"rows":[
{
"path":"/content/geometrixx/en",
"exists":true,
"hasContent":true,
"lastModified":0,
"iso":"en",
"country":"gb",
"language":"English"
},
{
"path":"/content/geometrixx/fr",
"exists":true,
"hasContent":true,
"lastModified":0,
"iso":"fr",
"country":"fr",
"language":"French"
},
{
"path":"/content/geometrixx/de",
"exists":true,
"hasContent":true,
"lastModified":0,
"iso":"de",
"country":"de",
"language":"German"
}.........So on
Here you can easily determine the all language copies available.
Documentation link:- https://docs.adobe.com/docs/en/aem/6-2/develop/components/pageinfo.html
I hope this would help you.
~kautuk
You can leverage the functionality of default servlet with selector as "language"
/content/geometrixx/en.languages.json?deep=false, with deep set as true, it will give the list of sub pages also.
Hi
You can make use of "PageInfo" servlet to obtain page information in JSON format.
Example:- http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=/content/geometrixx/
It will return JSON values,
Link:-
"languages":{
"rows":[
{
"path":"/content/geometrixx/en",
"exists":true,
"hasContent":true,
"lastModified":0,
"iso":"en",
"country":"gb",
"language":"English"
},
{
"path":"/content/geometrixx/fr",
"exists":true,
"hasContent":true,
"lastModified":0,
"iso":"fr",
"country":"fr",
"language":"French"
},
{
"path":"/content/geometrixx/de",
"exists":true,
"hasContent":true,
"lastModified":0,
"iso":"de",
"country":"de",
"language":"German"
}.........So on
Here you can easily determine the all language copies available.
Documentation link:- https://docs.adobe.com/docs/en/aem/6-2/develop/components/pageinfo.html
I hope this would help you.
~kautuk
Thank you
Views
Replies
Total Likes