I want to show a info field to my editors. But only if they edit content in other than my default lang. How could I archive that?
creating a hidden field with a value? how? using a page model? problem is, that kirby.language.code or a page model I created (lets call it page.isDefaultLang) does not work, the value becomes the key.. so it is comparing “de” with “page.isDefaultLang” instead of “de” with “de” …
Unfortunately, this is currently not easily possible, at least not if you have more than 1 non-default language. The when property currently only supports key => value pairs, where the key is a fieldname and the value a string or a boolean.
If you have only one non-default language, you could store the non-default language key in a hidden field when the translation is created (page.update:after hook), then check for the value of this field in then when condition.
There used to be a plugin called WhenQuery, but I don’t think it is compatible with Kirby 5.