sudippalash / lang-maker
Laravel package for Language Make and Edit
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
This package is auto-updated.
Last update: 2024-10-22 18:15:34 UTC
README
lang-maker
is a simple language handling package of Laravel
that provides to create and modify your project's lang folder.
Install
Via Composer
composer require sudippalash/lang-maker
You can publish the config file with:
php artisan vendor:publish --provider="Sudip\LangMaker\Providers\AppServiceProvider" --tag=config
This is the contents of the published config file config/lang-maker.php
:
return [ /* |-------------------------------------------------------------------------- | Extends Layout Name |-------------------------------------------------------------------------- | | Your main layout file path name. Example: layouts.app | */ 'layout_name' => 'layouts.app', /* |-------------------------------------------------------------------------- | Section Name |-------------------------------------------------------------------------- | | Your section name which in yield in main layout file. Example: content | */ 'section_name' => 'content', /* |-------------------------------------------------------------------------- | Route Name, Prefix & Middleware |-------------------------------------------------------------------------- | | Provide a route name for language route. Example: user.languages | Provide a prefix name for language url. Example: user/languages | If language route use any middleware then provide it or leave empty array. Example: ['auth '] */ 'route_name' => 'user.languages', 'route_prefix' => 'user/languages', 'middleware' => [], /* |-------------------------------------------------------------------------- | Ignore Language File |-------------------------------------------------------------------------- | | specify the file names (without extension) in array which you want to ignore to modify | or leave it blank array */ 'ignore_lang_file' => ['validation'], /* |-------------------------------------------------------------------------- | Bootstrap version |-------------------------------------------------------------------------- | | Which bootstrap you use in your application. Example: 3 or 4 or 5 | */ 'bootstrap_v' => 4, /* |-------------------------------------------------------------------------- | Flash Messages |-------------------------------------------------------------------------- | | After Save/Update flash message session key name | */ 'flash_success' => 'success', 'flash_error' => 'error', /* |-------------------------------------------------------------------------- | CSS |-------------------------------------------------------------------------- | | Add your css class in this property if you want to change design. */ 'css' => [ 'container' => null, 'card' => null, 'input' => null, 'btn' => null, 'link' => null, ], ];
Optionally, you can publish the lang using
php artisan vendor:publish --provider="Sudip\LangMaker\Providers\AppServiceProvider" --tag=lang
Usage
You should copy the below line and paste in your project menu section
<a href="{{ route(config('lang-maker.route_name')) }}">{{ trans('lang-maker::sp_lang_maker.language') }}</a>
License
The MIT License (MIT). Please see License File for more information.