Level 2
It was my fault - now with 'use Illuminate\Support\Facades\App' it is ok
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I would like to get validation errors in different languages. Only to test i set the language direct before the validation:
App::setLocale('de');
print_r(App::getLocale());
$this->validate($this->request, [
'email' => 'required'
]);
Instead of the text from 'resources/lang/de/validation.php' i get the 'fallback_locale' language.
After change the 'fallback_locale' to 'de' the german language file is used.
For other text i use Xinax\LaravelGettext.
Could this be the problem?
It was my fault - now with 'use Illuminate\Support\Facades\App' it is ok
Please or to participate in this conversation.