You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2022. It is now read-only.
After install a new laravel application with `Laravel >= 5.5` the package autodiscover system will register the new command `lang:add`.
27
+
### Add new language
28
+
After install a new laravel application with `Laravel >= 5.5` the package autodiscover system will register the new command `lang:add` and you can call with
28
29
29
-
This command can take a unique argument (or none) that will be the short name of the language according to **ISO 15897**.
30
+
```bash
31
+
php artisan lang:add <locale>
32
+
```
33
+
where `<locale>` refers to the short name of any of the [supported languages](README.md#supported-languages)
34
+
> ### *Warnings*
35
+
> -**Add lang** action overwrites the language files so that you already had custom translations you could lose them.
36
+
> - When adding a language this package first consults the `composer.json` file to copy only the translations of the supported packages that are installed ([Laravel Breeze](https://laravel.com/docs/8.x/starter-kits#laravel-breeze), [Laravel Cashier](https://laravel.com/docs/8.x/billing), [Laravel Fortify](https://laravel.com/docs/8.x/fortify) and [Laravel Jetstream](https://jetstream.laravel.com/2.x/introduction.html) are supported) `resources/lang/<locale>.json`. So it is good that you first install the supported packages that you will use and then run the command `php artisan lang:add <locale>`
37
+
> - If this command does not receive arguments, the Spanish language [`es`] will be installed by default.
30
38
31
-
If this command does not receive arguments, the Spanish language [`es`] will be installed by default.
39
+
This command can take a unique argument (or none) that will be the short name of the language according to **ISO 15897**.
32
40
33
41
This command also modifies the key `locale` in the `config/app.php` file to set the default language as passed through the parameter.
0 commit comments