Hello, this seems trivial but I did not find an answer online so far.

I have a multilingual site (German/french). How do I find the url path for the german version when I am on any of the french pages ( all are translated) . Fot exemple on the french page xyz.com/frenchpage1 I need to find the path to the german version of this page xyz.com/germanversion-of-frenchpage1.

Thanx for your help

Peter

Comments

sachinsuryavanshi’s picture

Hello Peter,

You can use Pathauto module to achieve this!!!

Use Token to setup pattern for your content types.

Let say for content type 1-
/node/102 => /en/xyz/titlename

/node/102 = > /es/xyz/ titlename

In this case only one parameter is changed and you can handle that case in your code.

https://www.drupal.org/project/pathauto

Thanks,
Sachin