Laravel has built-in functionality for dealing with translations. You can store arrays for language strings inside the resources/lang folders and depending on your lcaole settings Laravel will display the correct language.
When you use the __() function Laravel will search for the key in your translation strings and return the value.
In this tutorial we're going to make some changes to how Laravel finds your translation strings and will log any missing translation strings.
if ($translation === $key) { // Log missing translation string } https://paulund.co.uk/laravel-log-missing-translation-strings#override-the-default-laravel-translatorTo override the default Laravel translator we need to add some code to our AppServiceProvider.php file.