crayon/nova-language-management
最新稳定版本:2.0.2
Composer 安装命令:
composer require crayon/nova-language-management
包简介
A Laravel Nova tool that helps you implement dynamic languages.
README 文档
README
A tool for Laravel Nova to implement dynamic languages. The whole idea of this package is to rewrite the configuration files of several localization packages based on your inputs.
NOTE: This package does not support Nova 4 right now. We are working on making it available soon enough.
Installation
Use the package manager composer to install this tool.
composer require crayon/nova-language-management
Usage
Import the NovaLanguageEditor class at the top of your NovaServiceProvider like below:
use Crayon\NovaLanguageEditor\NovaLanguageEditor;
Open up NovaServiceProvider and register the tool in the tools method
/** * Get the tools that should be listed in the Nova sidebar. * * @return array */ public function tools() { NovaLanguageEditor::make(); }
Permissions
NovaLanguageEditor::make()->canSee(fn($request) => $request->user()->isSuperAdmin()),
Clarification
This tool is uses
Nova Translatable
Macamara Laravel Localization
Nova Translation Editor
If you do not have them installed it will install them for you. Also, make sure to publish the configuration files:
php artisan vendor:publish --provider="Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider" php artisan vendor:publish --tag="nova-translatable-config" php artisan vendor:publish --provider="Bernhardh\NovaTranslationEditor\ToolServiceProvider"
Migration
Publish language_lines (Nova Translation Editor) migration
php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="migrations"
php artisan migrate
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Screenshots
License
统计信息
- 总下载量: 3.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-30