Get a field value in other language

Hi!
I have a site with 3 languages.
I want to show the page title in the other languages that are not the language of the current page.
This is my poor approach:

<?php foreach( $kirby->languages() as $language ): ?>
   <?php if( $kirby->language() !== $language) : ?>
      <a href=""><?= $term->title()->t($language->code()) ?></a>
   <?php endif ?>
<?php endforeach ?>

The $item->title() is not translated - I see the current language field value 2 times (for the 2 other languages).

Any idea how can I get the title() of the page in the other language?

( I do have the title translated in the other languages in panel )

$term->content($language->code())->title();

t() is a separate function you cannot just append to a field object and also it expects a string as parameter, so that syntax you are using doesn’t exist.

1 Like

Thank you!