Internationalization — Laravel 10 Discovery Training

Laravel natively manages the internationalization of a site. When you need to display a string you can use the method __.

<div>{{ __('auth.login') }}</div>

Translations will be searched from the file lang located at the root.

/lang
    /en
        messages.php
        login.php
    /fr
        messages.php
        login.php

To publish the translation files integrated into Laravel (validation, authentication…) you can use the artisan command php artisan lang:publish.

If you want to quickly translate validation messages into French you can rely on the work of Laravel Lang.