Hello, how can I translate this word in loco translate?
Please upload at least one image.
Hi,
Unfortunately, there’s no way to do this via Loco Translate because these are browser-level validation messages, they are defined by the language selected in the browser.
But how to solve this problem?
The language in the browser is set to the desired one
I already found the solution myself!
Note to everyone
add_filter(
'hivepress/v1/forms/listing_update/errors',
function( $errors, $form ) {
$listing = $form->get_model();
if ( $listing && ! $listing->get_image__id() ) {
$errors[] = 'Please upload at least one image.';
}
return $errors;
},
100,
2
);
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.