AEM MSM - Retrieve Language Copy by API | Community
Skip to main content
May 19, 2020
Solved

AEM MSM - Retrieve Language Copy by API

  • May 19, 2020
  • 1 reply
  • 1812 views

Hi community,

 

I'm working with the MSM to define a site like this example:

  • /es/es/buy
  • /es/en/buy
  • /en/es/buy
  • /en/en/buy
  • /language-masters/es/buy
  • /language-masters/en/buy

When a user visit the page /es/es/buy, I would like to retrieve the path of the language copy (/es/en/buy/) for implement a custom language navigation and use it in the "alternate" meta for purposes of SEO.

 

Does it possible with the API Java? I've used the next apis and I did't find the way:

 

Also, I've detected If I change the name of a language copy, the reference in the touch-enabled UI is lost. The page doesn't appear like languague copy. So, what happen If I want a language copy with different name? How can I define a language copy with different name without lost the reference? I would like a site like the next:

  • /es/es/comprar
  • /es/en/buy
  • /en/es/comprar
  • /en/en/buy
  • /language-masters/es/comprar
  • /language-masters/en/buy

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 29, 2020
February 26, 2023

Hi Arun

 

How to get the list of language copies for the given page in java 

is there any java API to get the list of language copies available for given page.

 

for example:

http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=/content/we-retail/us/en

 

this will give the lang copies of this page

"language":"en",
   "languages":{
      "rows":[
         {
            "path":"/content/we-retail/us/en",
            "exists":true,
            "hasContent":true,
            "lastModified":0,
            "iso":"en",
            "country":"gb",
            "language":"English"
         },
         {
            "path":"/content/we-retail/us/es",
            "exists":true,
            "hasContent":true,
            "lastModified":0,
            "iso":"es",
            "country":"es",
            "language":"Spanish"
         }
      ]
   },

 

Thanks in adv