Multilingual contact form

The search for “multilingual contact form” did not give any results. That surprises me. Hence my question about how to implement such a thing, since it is not addressed in the cookbook.

  • How do I implement multilingual error messages or validator hints in the controller?
  • How do I create a multilingual email template?

See the guide: Custom language variables | Kirby CMS and also check out the further reading.

Thanks for the interesting link.
I already manage the form labels on site.yml to access them centrally, since forms are used on several pages.
In the controller or email template it is not possible to access these values as in a normal template?
<?= $site->branche()->kt()->inline() ?>
Managing the translations in a central place would of course be clearer.

It is, but not using the $site variable (which is only available in templates and snippets), but site().

1 Like

Thanks for the tip. I’ll look into that when I’m more familiar with the email issue.
Currently I use an external solution (Quform) that also works very well with Kirby. However, any external extension means more maintenance. And when development stagnates, you inevitably have to look for a new solution. Therefore I would rather use the internal possibilities.