Problem with correct url - multilanguage

i can’t get correct url in my multilanguage page.

I have two languages
In my blueprint i have this field:

label: Link to page
type: select 
options: pages

In themplate i have this:
<?= $page->link() ?>

I select pages in editor for default and second language, there name of url is correct
but when second language is active on page i have still url from default language


<?= $pages->find($page->link())->url($site->language()->code()); ?>

Thank You for attention
I haved to change type to structure, so now i have some like this:

<?php foreach($page->blocks()->toStructure() as $position): ?>
<a href="<?= $position->find($position->link())->url($site->language()->code()); ?>">link</a>
<?php endforeach ?>

but it doesn’t work
now i have page url with correct lang but without url selected page

Please use $pages instead of $position first:

<?php foreach($page->blocks()->toStructure() as $position): ?>
<a href="<?= $pages->find($position->link())->url($site->language()->code()); ?>">link</a>
<?php endforeach ?>

What do you mean exactly with “url selected page”?

I want to have url like this in default language:

In second language i want to have this:

Its the same page with changed name for specific langauge

but now i have this debug error:
Call to a member function url() on boolean

Can you paste the output from


from inside the foreach, and