Change fields names to new language when switching language

Hello!
I’m using two languages in my site and I would like to change the names of the fields labels when switching language in the panel…
Is there a way to achieve this?

this is my try, which works only in english:

       fields:
          artist:
            label:
              en: Artist Name
              he: Artist Name in Hebrew

this is how I set the hebrew language php file:

<?php

return [
  'code' => 'he',
  'default' => true,
  'direction' => 'rtl',
  'locale' => 'he_IL',
  'name' => 'Hebrew',
];

and yes - I turned the language field on in the config file as described here : (Introduction | Kirby CMS)

thanks in advance!

As stated in the docs:

Note that the language version shown to the user is based on the user language, not on the selected content language. Blueprint translations also only affect the Panel.

1 Like

If you create your blueprint definitions via PHP, you could change the labels based on selected language rather than user language, similar to how the options are translated in this example.

So you wouldn’t use the language tags, but return the translated label. Not tested, but should work.

1 Like

Thanks for the replies! I understand now :pray: