Skip to content

lumite-studios/laravel-json-translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lumite-studios/laravel-json-translation

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');
    }
}

About

JSON versions of the default Laravel translation files.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages