I am looking for a code which would create the url of a page in the other language.
I have a site with two languages and would like to link e.g. the German page to the Turkish page and vice versa.
I came across this pice of code:
which I would use with the page parameter:<?= $page->language('tr')->url() ?>
But then how can I code it so that the ‘tr’ changes to ‘de’ when I’m on the Turkish page?
Might it be be possible to translate the string in the languages templates?