afsakar / filament-translate-action
为 FilamentPHP 提供翻译动作
v1.1.0
2024-07-05 08:40 UTC
Requires
- php: ^8.1
- filament/forms: ^3.0
- illuminate/contracts: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
本包提供了一个简单的动作,用于翻译 FilamentPHP 中的字段。
安装
您可以通过 composer 安装此包
composer require afsakar/filament-translate-action
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="filament-translate-action-config"
这是发布配置文件的内容
return [ 'laravellocalization' => true, // if you use mcamara/laravel-localization package you can set this to true // if you don't use mcamara/laravel-localization package you can set your locales here 'locales' => [ 'tr' => 'Türkçe', 'en' => 'English', ], ];
使用方法
... RichEditor::make('body') ->label('Body') ->translatable() // add this line to make field translatable. That's it! ->required(), ...
截图
测试
composer test
变更日志
请参阅 变更日志 以获取有关最近更改的更多信息。
贡献
请参阅 贡献指南 以获取详细信息。
安全漏洞
请查看 我们的安全策略 了解如何报告安全漏洞。
致谢
许可证
MIT 许可证(MIT)。请参阅 许可证文件 以获取更多信息。