PHP code example of lumite-studios / laravel-json-translation

1. Go to this page and download the library: Download lumite-studios/laravel-json-translation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lumite-studios / laravel-json-translation example snippets


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