laravel-lang / json-fallback-hotfix
Fixing a bug with processing fallback JSON keys
Fund package maintenance!
Open Collective
Requires
- php: ^7.2 || ^8.0
- illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/translation: ^6.0 || ^7.0 || ^8.0 || ^9.0
Requires (Dev)
- orchestra/testbench: ^4.0 || ^5.0 || ^6.0 || ^7.0
- phpunit/phpunit: ^8.5 || ^9.0
This package is auto-updated.
Last update: 2022-08-19 00:59:37 UTC
README
Installation
To get the latest version of Laravel Lang: JSON Fallback Hotfix
, simply require the project using Composer:
composer require laravel-lang/json-fallback-hotfix
Next, in the providers
section of the config/app.php
file, replace Illuminate\Translation\TranslationServiceProvider::class
with LaravelLang\JsonFallbackHotfix\TranslationServiceProvider::class
.
It's all 😊
What's fixed
Out of the box, Laravel doesn't allow fallback translations for JSON keys.
For example, when you call __('Remember Me')
, you get Remember Me
instead of Se souvenir de moi
for French fallback language.
This package solves this problem.
License
This package is licensed under the MIT License.