Settings page, multi-language issue

Hi,

I’ve created a settings tab on the main panel page, site.yml:

I was editing my templates and didn’t understand why my code didn’t work. After 30 minutes I realized my settings are set per language.

I have a bunch of settings… add a logo, custom css… many awesome customizations.

How can I make sure my settings are global? Or should I add my settings somewhere else?

Best,
Johan

You can set your fields to translate: false. That way, values cannot be translated and Kirby will fall back to the value of the default language in other languages.

Yes that works. Would be cool to have an option that would mirror/sync the value between languages.

Will definitely get the question why the input is grayed out. That they have to switch back to the default language to modify settings.

Is there a way to hide a field for the default language? I was thinking of adding an info field that would advise the user to switch to the default language in order to make changes to the settings.

Maybe with a little trick: a hidden field that stores the language code as a default when a page is created, then make the info field a conditional field.

1 Like

You could do that by using a hook. But there might be a certain risk of running into inconsistencies.

1 Like