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 😊
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.
This package is licensed under the MIT License.