Hi,
I followed the example in the cookbook for a basic contact form and it works.
Questions is: how do I go about translating the error message and success message?
I assume it should be in this part of the code?
} catch (Exception $error) {
$alert['error'] = "The form could not be sent";
}
// no exception occured, let's send a success message
if (empty($alert) === true) {
$success = 'Your message has been sent, thank you. We will get back to you soon!';
$data = [];
}
but I take it I canāt just use the āt(āerrorā)ā function thatās used elsewhere to have translations show upā¦?
A pointer would be great! Thanks!