Getting all translation page slugs

As im new to yii2 im trying to get all available translation page slugs, so for example I want to loop all page slugs on the same page (available translatiosn are for example en, de,es) as im trying to add all correct hreflang attribute to the code.

Atm it only shows the current language slug.

Hi mark, welcome to the forum.

What do you mean by "page slugs"? Would you please explain by an example?

well im new to yii2, so im trying to get all translated urls, below is an example. I want to add all translated available urls on the same page which i want to use for the hreflang attribute.

<link rel="alternate" href="" hreflang="en"/>

<link rel="alternate" href="" hreflang="nl"/>

<link rel="alternate" href="" hreflang="de"/>

<link rel="alternate" href="" hreflang="es"/>

It looks not very easy at first sight.

Guide > I18N

Guide > Routing and URL Creation

Thanks, but could not find any solution for my question in these docs.

Hi Mark

Have you tried this