Laravel overriding package translation files

Laravel overriding package translation files

May 02, 2019 / Ramesh Mhetre

You always have to use many different packages within your application. Sometimes, these packages comes with their own language files. In case you want those specific things in your own language, then you can override them.

Override package translations in laravel

Instead of changing package's core files you can change them you may override them by placing files in resources /lang/vendor/{package}/{locale} directory.

For example, if you have to override the English translation strings in validation.php for a package named laravel/nova, you should place a language file at: resources /lang/vendor/nova/en/validation.php. Within this file, you should only define the translation strings you wish to override. Any translation strings you don't override will still be loaded from the package's original language files.


Similar Articles

What is new to Laravel 6?

What is new to Laravel 6?

Today Laravel 6 has finally officially released. Let's have a detailed look at what is changing in Laravel 6.
Read more...
Connect your laravel application to Sqlite DB

Connect your laravel application to Sqlite DB

Quickly connecting with sqlite database within laravel application
Read more...
Laravel v6 & Laravel Vapor is going to release soon 🚀

Laravel v6 & Laravel Vapor is going to release soon 🚀

Laravel v6 is is releasing soon. Serverless laravel is next big thing in laravel community!
Read more...