Description
Hi all,
this is not a classic issue about a bug but more a hint for developers using this localization library. I hope the hint will be useful for all who are getting nuts with a nasty "problem" which encountered me today and took me hours to "solve". It's about the config cache of Laravel which holds a representation of the whole Laravel configuration files to speed up config accessings.
Well, I tried to add a new messages file to the language folders in resources/lang (Laravel 5.7) and also added the name of the new message file to the config's messages array. I called Artisan to rebuild messages.js and voilá... nothing happened, the new translations had been skipped. This was somewhat creepy as I added new messages files yesterday and everything was fine. After retrying this procedure for hours, debugging the sources and oiling the chainsaw I found that the JS generator script did not load the most recent edition of the localization-js.php file but got his data from the config cache. Oh dude...
Ok, so just clear the config cache of Laravel (php artisan config:cache). rebuild your messages.js file and finally the new translations will be available.
Hopefully this hint may help other people to avoid such "afternoon fun" ;-)
Regards
Crazykriz