Closed misog closed 1 year ago
What version of the laravel-lang/lang
package is installed in the project? Or are you using the laravel-lang/common
package?
Apparently, you installed new versions of packages without checking them against the compatibility table.
Write your versions and I can tell you exactly what needs to be done to solve the problem.
I installed it like this:
composer require laravel-lang/common --dev
In composer.lock I have laravel-lang/lang of version 13.2.2
Also
Laravel-Lang Publisher Version: v14.7.0
Laravel Version: v9.52.14
PHP Version: 8.2.1
Also we are using non-standard architecture of Laravel. So if Pubisher automatically detects needed translations maybe this could be the problem.
I see what the problem is. The "laravel-lang/common" package is not strictly tied to the version of the framework, so you installed it without any problems.
Thus, the "laravel-lang/lang" package version 13.2.2 was installed, and it does not contain translations for Laravel 9 (you can check the compatibility table).
To solve this problem, run the console commands:
composer remove laravel-lang/common --dev
composer require laravel-lang/common:^3.0 --dev
Thank you, it is working now. This could be documented for other people.
This problem is encountered when installing older versions. I have released a fix that will install the correct version and get rid of the error.
Environment
Issue description
When I add
php artisan lang:add de
orphp artisan lang:add es
or any other language thenvalidation.php
is created however keys are missing. There are no translations of validation errors etc... Here is the file:Steps to reproduce
php artisan lang:add es