workup/nova-translations-loader
Composer 安装命令:
composer require workup/nova-translations-loader
包简介
This Laravel Nova package helps developers load translations into their packages (forked by optimistdigital).
README 文档
README
This Laravel Nova package helps developers load translations into their packages.
Requirements
php: >=8.0laravel/framework: ^9.0|^10.0laravel/nova: ^4.0
Installation
Install the package in a Laravel Nova project via Composer:
composer require workup/nova-translations-loader
Usage
Inside a Laravel's ServiceProvider, use the LoadsNovaTranslations trait and call $this->loadTranslations():
use Outl1ne\NovaTranslationsLoader\LoadsNovaTranslations; class SomePackagesServiceProvider extends ServiceProvider { use LoadsNovaTranslations; public function boot() { // ... /** * Loads translations into the Nova system. * * @param string $packageTranslationsDir The directory for the packages' translation files. * @param string $packageName The name of the current package (ie 'nova-menu-builder'). * @param boolean $publishTranslations Whether to also automatically make translations publishable. * @return null **/ $this->loadTranslations(__DIR__ . '/../resources/lang', 'nova-package', true); // ... } }
Credits
License
Nova Translations Loader is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 1.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-27