Make fields non-translatable by default

I’m currently working on a multi language site that’s heavily based around numeric values (positions, size, subpages-amount) that don’t change for different translations of the same pages. The vast amount of fields in my blueprints (90%) will hold these numeric non-translatable values, while only a small amount of fields will actually hold translatable content (10% of all fields).

While I know that translations can be disabled for a field by simply adding translate: false inside the blueprint I would have to do that for a large number of fields which is a bit cumbersome and caused some errors for me in the past (forgetting to add it to a field and ending up with different values for different languages).

I’m wondering wether it’s possible to somehow override Kirby’s blueprint defaults so that in a multi-language setup all fields would be non-translatable by default and I would only allow translations for the select few fields by adding translate: true to them.

Ideally it would be a solution that I can set up in the form of either config-options or a custom plugin as I’m not quite confident enough to extend/modify Kirby’s classes on my own.

Anyone has an idea?

i would also love to have more flexibility here. totally agree that it sometimes takes aaages to add this everywhere + increases the possibility of errors.

maybe something like setting translate: false for an entire blueprint and then enabling it again for specific fields. @bastianallgeier @lukasbestle how do you feel about that?

:blossom: :sparkles:

I understand how it can be useful. However it would make the blueprint syntax even more complex than it already is, both concerning readability and the required logic.

A possible alternative could be reusing and extending commonly used numeric-only fields.

1 Like