Problem with transalting Laravel UI auth pages
ax-ross opened this issue · comments
Environment
- Laravel-Lang Version: 10.9.1
- Laravel Version: 9.15.0
- PHP Version: 8.1.6
Issue description
Hello, today i have a problem: my registration and login pages was not translated (I'm using laravel ui auth). In blade template I saw, that laravel ui auth used __ function for get translating on key. In my file lang/ru/ru.json was this key. But __ function didn't found this. I looked how __ function working and i saw, that this function found file ru.json in folder lang/ without subfolder.
I fixed my problem: i just moved file ru.json to lang/ directory.
Steps to reproduce
I installad laravel lang: composer require laravel-lang/lang --dev. Then I copied folder vendor/laravel-lang/lang/locales/ru to lang/ru.
And one more thing: json files should be on the path lang/ru.json
, not lang/ru/ru.json
.
See https://laravel.com/docs/9.x/localization#using-translation-strings-as-keys