lumite-studios / laravel-json-translation
There is no license information available for the latest version (v1.1) of this package.
JSON versions of the default Laravel translation files.
v1.1
2023-09-12 07:17 UTC
Requires
- php: ^8.1
- laravel/framework: ^9.0|^10.0
README
This package adds JSON translation versions of the default Laravel translation files. It also makes it possible to add custom JSON translations with a prefix.
Documentation
Installation
composer require lumite-studios/laravel-json-translation
Usage
use LumiteStudios\JSONTranslations\TranslationServiceProvider as ServiceProvider; class TranslationServiceProvider extends ServiceProvider { /** * Perform post-registration booting of services. */ public function boot() { parent::boot(); $this->loadJsonTranslationsWithPrefix('../../lang/errors', 'errors'); $this->loadJsonTranslationsWithPrefix('../../lang/other', 'other'); } }