Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 3

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

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

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

This second part is related with link tags at head:

<link rel="canonical" href="/es/prensa..."/>
<link rel="alternate" hreflang="x-default" href="/en/press..."/>
<link rel="alternate" hreflang="es" href="/es/prensa..."/>
<link rel="alternate" hreflang="en" href="/en/press..."/>

 

Is it possible using the Java API? I've used the next API classes and I did't find the way:

 

Also, I've detected that if I change the name of a language copy, we loose the reference in the touch-enabled UI. The page doesn't appear as a language copy. So, what happen If I want a language copy with a different name? How can I define a language copy with a different name without loosing the reference? I would like a site like this:

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

Thanks!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

Who Me Too'd this topic