I’m making a multilang website where some parts are from the label of some fields in the panel.
So far, it’s working like that :
fields:
admin:
label:
fr: Équipe administrative
en: The main team
<summary><?= $page->blueprint()->field('admin')['label'][$kirby->language()] ?></summary>
I’m trying to get the value of the label using this, it’s working nicely if I use [‘fr’]
, but as soon as I use [$kirby->language()]
it’s returning me this error :
Cannot access offset of type Kirby\Cms\Language on array
Is there something I can do to make this working?
Thanks!