My service provider of my custom package has the following lines in the boot()
method:
$this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'name');
$this->publishes([
__DIR__.'/../resources/lang' => resource_path('lang/vendor/name'),
], 'lang');
I ran the php artisan vendor:publish
command and the packages/vendorname/packagename/resources/lang/de.json
file was successfully copied to the project.
The translation is not working. I tried copying to the /lang/vendor/name/
folder as well.
When I move my de.json
file manually to /lang
then the translation is working. To there is no issue with the file itself.
I tried to clear all caches already.