Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lang Laravel Package

laravel-lang/lang

Community-maintained localization files for Laravel. Install via Composer to add and update translations for Laravel’s core messages across many locales, with curated language packs and ongoing updates from the Laravel Lang project.

View on GitHub
Deep Wiki
Context7

List of 126 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI

Frequently asked questions about Lang
How do I install Laravel Lang translations for my Laravel 9/10 app?
Run `composer require laravel-lang/lang` and publish the translations with `php artisan lang:publish`. This copies all language files to `resources/lang/vendor/lang`, which Laravel automatically loads. No additional configuration is needed for basic usage.
Does this package support Laravel Jetstream/Fortify/Breeze auth translations?
Yes, the package includes curated translations for Jetstream, Fortify, and Breeze auth messages (e.g., login, password reset, 2FA). Just publish the translations, and these will override Laravel’s default auth strings for all supported languages.
Will this work with Laravel Nova or Cashier?
Yes, the package covers Nova and Cashier translations, including subscription messages, invoices, and team-related terms. However, verify compatibility with your Nova/Cashier version, as some newer features may require manual updates.
What if a language is missing critical translations (e.g., passkey errors)?
Some languages (e.g., Bulgarian, Vietnamese) lack passkey-specific messages. Use fallback logic like `trans('lang::key', [], 'en')` or manually override missing keys in `resources/lang/{locale}/vendor/lang`. Contribute fixes to the repo to help the community.
Does adding 128 languages slow down my Laravel app?
Minimal impact if you use `config('app.fallback_locale')` to lazy-load only needed languages. For development, install with `--dev` to avoid bloating production. Test boot time with `php artisan optimize:clear` and Xdebug profiling.
How do I override or extend translations for a specific locale?
Place custom files in `resources/lang/{locale}/vendor/lang` (e.g., `resources/lang/fr/vendor/lang/auth.php`). Laravel’s precedence rules ensure your files override the package defaults. Useful for tailoring messages without forking the package.
What Laravel versions are supported, and are there breaking changes?
The package supports Laravel 8+, 9+, and 10+. Major updates align with Laravel releases, but some auth flows (e.g., passkeys) may require manual patches. Check the [changelog](https://github.com/laravel-lang/lang/blob/main/CHANGELOG.md) for version-specific notes.
Can I use this for a non-Laravel PHP project?
No, this package is Laravel-specific and relies on Laravel’s localization system (`trans()` helper, `config/app.php`). For vanilla PHP, use alternatives like Symfony’s `translation` component or gettext. Laravel’s ecosystem integrations (Jetstream, Nova) won’t work outside Laravel.
How do I validate translations in CI before merging?
Add a script to check for missing keys in critical paths (e.g., auth, validation) using `php artisan lang:dump` and diffing against a reference JSON. Tools like `laravel-lang/validator` or custom PHPUnit tests can automate this.
What’s the best way to contribute missing translations?
Fork the repo, add translations to the appropriate `.json`/`.php` files in `resources/lang/{locale}/vendor/lang`, and submit a PR. Follow the [contribution guidelines](https://laravel-lang.com/contributions.html). For large updates, open an issue first to discuss scope.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata