coderello/laravel-nova-lang

Language support for Laravel Nova.

2.0.1 2022-10-28 17:13 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.

Latest Nova version 4.17.1
Total languages 45
Total lines translated 17,839 (86.9%)

Code Language Translated files Lines translated Thanks to
en English php json 456 (100%) taylorotwell, bonzai, davidhemphill, jbrooksuk, themsaid, kitbs, dillingham
fr French php json 456 (100%) MarceauKa, shaffe-fr, Yannik-Slym, InfinityWebMe, kitbs, Arryan, voidgraphics, KillianH, rbnhtl, stockhausen
de German php json 456 (100%) pille1842, kitbs, shieraki, StanBarrows, tobiasthaden, dakira
es Spanish php json 456 (100%) kitbs, joebordes, ajmariduena, iksaku, IGedeon, SpiritSaint, alejandrotrevi, Arryan, kennyhorna, miktown, xcodinas, AndresReyesDev, Vitorinox, dgtal, rodrigore
uz‑Latn Uzbek (Latin) php json 447 (98%) shokhaa, professor93
ru Russian php json 444 (97.4%) hivokas, sanasol, makhsam, den1n, medvinator, deadem, soulshockers, kongulov, saundefined, ankkk, estim
az Azerbaijani php json 443 (97.1%) kongulov
pt‑BR Brazilian Portuguese php json 439 (96.3%) henryavila, pedrofurtado, eduardokum, saulo-silva, chbbc, ranierif, hpiaia, IgorDePaula, emtudo
id Indonesian php json 422 (92.5%) dvlwj, opanegro, Kristories, ezhasyafaat
tr Turkish php json 422 (92.5%) jnbn, bureken, Milkhan, erayusta, sineld, semihkeskindev, dilekuzulmez, suleymanozev
tk Turkmen php json 421 (92.3%) kakajansh
ka Georgian php json 420 (92.1%) akalongman, zgabievi
ro Romanian php json 420 (92.1%) BTeodorWork, dtix, alexgiuvara
ar Arabic php json 416 (91.2%) saleem-hadad, danyelkeddah, omarfathy13, MohamedMaher5, CaddyDz, i3asm, moedayraki, Arryan
nl Dutch php json 416 (91.2%) DannyvdSluijs, happyDemon, steefmin, jschram, sebastiaanspeck, preliot, webovatenl, daniel-de-wit
it Italian php json 416 (91.2%) (unknown), alfonsocuccaro, f-liva, manuelcoppotelli, trippo, dejdav
km Khmer php json 416 (91.2%) chhaihongsrun
ur Urdu php json 416 (91.2%) junaidtariq48
hu Hungarian php json 403 (88.4%) milli05, bgeree, lintaba
cs Czech php json 402 (88.2%) walaskir, theimerj, genesiscz, walaski
ca Catalan php json 401 (87.9%) joebordes, gerardnll
af Afrikaans php json 400 (87.7%) medlion
bs Bosnian php json 400 (87.7%) hajro92
ja Japanese php json 400 (87.7%) Tsumagari, storyn26383
nb Norwegian Bokmål php json 400 (87.7%) einar-johan
sv Swedish php json 400 (87.7%) tanjemark, slackernrrd
uk Ukrainian php json 400 (87.7%) soulshockers, Ostap34JS, osbre
fa Farsi php json 398 (87.3%) alirezamirsepassi, mziraki, zareismail, SadeghPM
pl Polish php json 392 (86%) pzmarzly, Strus, marekfilip, mslepko, wiktor-k
zh‑CN Chinese (Simplified) php json 388 (85.1%) jcc, zacksleo, masterwto
zh‑TW Chinese (Traditional) php json 388 (85.1%) CasperLaiTW, zacksleo, storyn26383
pt Portuguese php json 379 (83.1%) Pedrocssg
da Danish php json 351 (77%) olivernybroe, rugaard, peterchrjoergensen
eu Basque php json 349 (76.5%) JonPaternain
hr Croatian php json 347 (76.1%) defart, walaski
fil Filipino php json 347 (76.1%) granaderos
fi Finnish php json 347 (76.1%) Krisseck
hi Hindi php json 347 (76.1%) bantya
sr Serbian (Cyrillic) php json 347 (76.1%) marjanovicsteva
sr‑Latn Serbian (Latin) php json 347 (76.1%) marjanovicsteva
sk Slovak php json 347 (76.1%) hejty
sl Slovenian php json 347 (76.1%) morpheus7CS
lt Lithuanian php json 346 (75.9%) minved
bg Bulgarian php json 344 (75.4%) BKirev
tl Tagalog php json 340 (74.6%) rcjavier