In this video we are going to learn about Localization.
Laravel's localization features provide a convenient way to retrieve strings in various languages,
Allowing you to easily support multiple languages within your application.
Language strings are stored in files within the lang directory inside the resources folder.
Within this directory there should be a subdirectory for each language supported by the application.
So lets create language file.
So go to the resources folder and open lang folder.
You can see inside the lang folder there is en folder which is for English.
So here inside the en folder just create a new file.
Let say file name is message.php.
Now inside the message.php file.
Simply return an array So just type here.

return [
\"welcome\"=>\"Welcome to the laravel\",

Now go back to the lang folder and here create another folder.
Let say folder name is hi.
Its for hindi.
Now create a file message.php inside the hi directory.
Inside the messag.php file Just return an array so write the following code.

return [
\"welcome\"=>\" laravel में आपका स्वागत है।\",

Now save the file and.
Goto the welcome.blade.php and here just use the language.
So Just type here


Now lets modify the welcome route.
So goto the web.php.

Route::get(/{locale}', function($locale){
return view('welcome');

Now save all Lets check.
Switch to the browser and go to the url.
You can see the welcome message an language in English.
Now change the url /hi
Now you can see message and language are showing in hindi.
So in this way you can use localization in laravel 8.