I am doing web app in a different language. I have implemented the lang for validations messages, but how can i change the input names? Is something built right in for this purposes?
For example "user" is in czech "uživatelské jméno".
@homoky in the same dir i.e cz create your language file for form and define your translations:
//file: laravel_installation_path/resources/lang/cz/form.php
return [
'username' => 'uživatelské jméno'
//more form related translations here.
];
//now you can use this inside your views.
<label for="username">trans('form.username')</label>
There is no better workflow? In L4 there was a possibility to add array of own names to it. Why is there localization when it does not work with another part of the framework? It seems quite incomplete.
The resources/lang/*/validations.php can handle the translation of the tokens in error messages. I remember you can put some kind of associative array.