Get translated content in templates

Dear forum,

I have the feeling that I am missing something (again).

I’m building a multi-language website. When using the $page object (of the current page), I automatically get the translated content when accessing the fields (e. g. $page->field()).

When I get a page’s children in order to list them on an overview page, this does not work. The field’s content is always returned in the default language.

Do I really have to use the content() method of the child page and always pass the current language to it?

Thank you!

No, that should not happen. If you are on the default language, you should get default children pages, if you are on another language, all pages should be in that default language, unless the pages have no translations (in this case, Kirby falls back to the default language).

What code are you using?

Thank you for reassuring—I thought that this can’t be right.

I found the mistake: I had a catch-all route, which also caught the language bit on the homepage (’/en’). That’s also why it worked on pages other than the homepage…