cirelramos/languages

package set language to life of request

1.0.5 2023-01-03 20:13 UTC

This package is auto-updated.

Last update: 2024-10-30 01:32:07 UTC


README

Software License

About

The languages package to get header content-language and set value to life of request .

Tutorial how create composer package

Installation

Require the cirelramos/languages package in your composer.json and update your dependencies:

composer require cirelramos/languages

Configuration

set provider

'providers' => [
    // ...
    Cirelramos\Languages\Providers\ServiceProvider::class,
],

The defaults are set in config/languages.php. Publish the config to copy the file to your own config:

php artisan vendor:publish --provider="Cirelramos\Languages\Providers\ServiceProvider"

Note: this is necessary to yo can change default config

Usage

add provider in config/app.php

        'api' => [
        // .
        // .
            Cirelramos\Languages\Middlewares\LanguageMiddleware::class,
        ],

License

Released under the MIT License, see LICENSE.