My website has translations in three languages. I would like to know how i can translate the validation messages and success template of the Kirby Uniform plugin.
Hi. I have the same problem as illycz right now (and 3 years later).
Have you or someone else found a solution for this yet?
I have also tried the following without success … I get the message only in the default language
/**
* Request Form
*/
[
'pattern' => '(:any)',
'method' => 'POST',
'language' => 'en', // de is the default
'action' => function($language) {
$langcode = $language->code();
$form = new \Uniform\Form([
'name' => [
'rules' => ['required'],
// 'message' => t('requestFormMessageName'), // also does not work
// 'message' => I18n::translate('requestFormMessageName', null, $langcode), // also does not work
'message' => t('requestFormMessageName', null, $langcode), // not working
],
....
]
}
],