coderello / laravel-nova-lang
Language support for Laravel Nova.
Installs: 945 917
Dependents: 3
Suggesters: 0
Security: 0
Stars: 426
Watchers: 8
Forks: 195
Open Issues: 2
Requires
- php: ^7.1|^8.0
Requires (Dev)
- php: ^8.0
- ext-curl: *
- illuminate/console: ^8.0
- illuminate/events: ^8.0
- illuminate/filesystem: ^8.0
- laravel/nova: ~4.0
- 2.0.2
- 2.0.1
- 2.0.0
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.x-dev
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.26
- 0.1.25
- 0.1.24
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.20
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-patch-2
- dev-formal
This package is auto-updated.
Last update: 2024-10-30 09:27:52 UTC
README
Language files for Laravel Nova translated into 40+ languages.
This is not an official Laravel package, but is built from community contributions. If you are able to help by submitting a new language, reviewing an existing language, or adding missing keys, please read our contributing guidelines and raise a PR.
Installation
composer require coderello/laravel-nova-lang
Usage
Publish Command
Publish translations for one language:
php artisan nova-lang:publish de
Publish translations for multiple languages (comma-separated):
php artisan nova-lang:publish de,ru
Publish translations for all available languages:
php artisan nova-lang:publish --all
Publish translations and override existing files:
php artisan nova-lang:publish de,ru --force
Aliases
The language codes chosen for the files in this repository may not match the preferences for your project. You can use the ‑‑alias
option to publish locales using a different filename.
Publish translations for one language with an alias, using the simple format {alias}
:
php artisan nova-lang:publish de --alias=de-DE
This will publish the file de-DE.json
.
Publish translations for multiple languages with multiple aliases, using the format {locale}:{alias}
(comma-separated):
php artisan nova-lang:publish de,ru,fr --alias=de:de-DE,ru:ru-RU
This will publish the files de-DE.json
, ru-RU.json
and fr.json
(no alias).
Aliases can also be used with the --all
flag:
php artisan nova-lang:publish --all --alias=es:es-ES
You do not need to supply an alias for every locale that is to be published, only those that you wish to override.
Here are some example aliases for common use cases:
- Use Chinese with scripts instead of regions:
zh-CN:zh-Hans,zh-TW:zh-Hant
- Default to Brazilian Portuguese over European:
pt:pt-PT,pt-BR:pt
- Default to Serbian in Latin script over Cyrillic:
sr-Latn:sr,sr:sr-Cyrl
There is also an --underscore
or -U
switch to publish locales with an underscore separator instead of a hyphen. This can be used in combination with aliases.
Development Commands
Documentation of development commands for contributors and maintainers is available at Development Commands.
Available Languages
We welcome new languages and additions/improvements to existing languages! Please read our contributing guidelines and raise a PR.
Note: There is no need to update the count of translated strings and add your username below, as this is done by script when your PR is merged.