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 resources/lang directory. Within this directory there should be a subdirectory for each language supported by the application.
  • Here you see the default view of the error 404 page (left) and the login page (right)

Default

  • All these pages can easily be translated to another language

Dutch localization

  • Clone this repo to your desktop: https://github.com/Laravel-Lang/lang
    • Copy the folder src/nl from this repo to the folder resources/lang/ of your project
    • Copy the file json/nl.json from this repo to the folder resources/lang/ of your project

Language folder

  • Open the file /config/app.php
    • Find the entry 'locale' => 'en', and change it to nl (= Dutch)











 

 /*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/

'locale' => 'nl',
1
2
3
4
5
6
7
8
9
10
11
12

Dutch

Last Updated: 11/16/2021, 11:08:35 AM