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
16
29
17
-
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.
18
38
19
-
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**.
20
40
21
41
This command also modifies the key `locale` in the `config/app.php` file to set the default language as passed through the parameter.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
58
85
59
-
This package does not modify the translations, only copies them of[`laravel-lang/lang`](https://github.com/Laravel-Lang/lang/). So if you want to suggest changes in the translations you can make a PR to the [`laravel-lang/lang` package](https://github.com/Laravel-Lang/lang/blob/master/docs/contributing-to-dev.md)
86
+
This package does not modify the translations, only copies them from[`laravel-lang/lang`](https://github.com/Laravel-Lang/lang/). So if you want to suggest changes in the translations you can make a PR to the [`laravel-lang/lang` package](https://github.com/Laravel-Lang/lang/blob/master/docs/contributing-to-dev.md)
60
87
61
88
## License
62
89
[MIT](LICENSE.md)
90
+
91
+
## Todo
92
+
93
+
-[ ] Allow merge translations instead of overwrite them.
94
+
-[ ] Add Command `lang:update` to update translations and detect new installed packages to update their translations.
0 commit comments