Return page in all languages

i’m trying to return a page in all it’s languages.

<?php $field = $page->content('en')->get('About'); ?>
gets me the page in english

<?php foreach($site->languages() as $language): ?>
  <li><?= $language ?></li>
  <?php $field = $page->content($language)->get('About'); ?>
<?php endforeach ?>

gets me an error.

is there an easy way to get all 9 languages of the home page on one webpage?

This will work:

<?php foreach($site->languages() as $language): ?>
  <li><?= $language ?></li>
  <?php $field = $page->content($language->code())->get('text'); ?>
<?php endforeach ?>

Reason: you have to pass a string instead of an object to the content method.

wow thanks!
stupid me :confused: