Hallo,
i’m looking for way to translate alerts from php script
I have a validatior in script:
$errors = [];
if (empty($_POST["name"])) {
$errors[] = l::get('name');
} else {
$name = implode(', ' ,$_POST['name']);
}
in language/de file i have this
l::set('name', 'gib den Nachnamen an');
in language/fr file i have this
l::set('name', 'donne le nom de famille');
But i have a error
Fatal error: Uncaught Error: Class ‘l’ not found in
Problem is with this, but i don’t know how can i translate allerts diferent way.
$errors[] = l::get('name');