Sending email and want to change the language of bodytext email

From the contact form on a site I can send email, but I want to change the bodytext in the email to dutch.

I use the Uniform plugin but I can’t find the place where I can edit the text.

this is the controller code:

<?php

use Uniform\Form;

return function ($kirby)
{
    $contactform = new Form([
        'email' => [
            'rules' => ['required', 'email'],
            'message' => 'E-mailadres is verplicht',
        ],
        'recipient' => [
            'rules' => ['required'],
            'message' => 'Kies een ontvanger',
        ]
        ,
        'name' => [
            'rules' => ['required'],
            'message' => 'Naam is verplicht',
        ],
        'message' => [
            'rules' => ['required'],
            'message' => 'Boodschap is verplicht',
        ],
    ]);

    if ($kirby->request()->is('POST')) {
        $contactform->emailSelectAction([
            'from' => 'info@kindkans.nl',
            'allowed-recipients' => [
                'Test2'     => 'joranovski@gmail.com',
            ],
        ])
        ;
    }

    return compact('contactform');
};

Which results in an email with this plaintext:

Screenshot 2020-07-23 at 15.59.38

These are the settings in the site/config.php
Screenshot 2020-07-23 at 14.30.28

Ok, I just kept on searching and could it be that the answer I’m looking for can be found in the EmailAction.php from the Uniform template?

There is a template that you should be able to override with your own email template.

Thanks, but after some thorough reading of all the documentation of the plugin,
I see that the fieldnames are displayed throught this bit

echo ucfirst($field).': '.$value."\n";

So I changed the names on the inputs and the controller and in the EmailSelectAction.php to the dutch counterparts and that did work.

But that doesn’t feel like the most elegant solution if you have a multilingual site.
But for now my problem is solved

In a multilanguage environment you could work with translation variables. Or create your own email templates.

@pixelijn @texnixe the only thing left now is to define the template with which I can send the mail.
In which file do I have to configure this.

this snippet I Can alter but where do I put it? In the site/config.php file?

I’ve already put the templates in the site/templates/emails/ folder

$kirby->email([
  'to' => 'peter@lustig.de',
  'template' => 'my-email',
  'data' => [
    'num' => '2'
  ]
]);

I guess I’m in a squeeze between the Uniform plugin and the native Kirby email functionality

The email action accepts the same options than the email function of Kirby.
https://kirby-uniform.readthedocs.io/en/latest/actions/email/

So you can tell the plugin to use the template you defined in your template folder.

Yeah, but i doesn’t select the proper template in my case.
I want to send an HTML email, so I created a file named my-email.html.php in the site/templates/emails folder and in the controller which looks like this

Have you tested if a basic text template works, i.e. without the html name part?