The package heavily depends on the Spatie Translatable packages
You can install the package via composer:
composer require concept7/filament-deepl-translations
Optionally, you can publish the language using
php artisan vendor:publish --tag="filament-deepl-translations-languages"
Add the following to services.php
'deepl' => [
'api_key' => env('DEEPL_API_KEY'),
],
And add DEEPL_API_KEY to your .env
RichEditor::make('body')
->label('Body')
->translatable() // add this line to make field translatable. That's it!
->required(),
If you would like to bulk update records then theres a BulkAction in place:
use Concept7\FilamentDeeplTranslations\Actions\DeeplBulkTranslatableAction;
->bulkActions([
DeeplBulkTranslatableAction::make(),
])
Make sure you add the Deepl Trait to the corresponding models.
use Concept7\FilamentDeeplTranslations\Traits\Deepl;
use Deepl;
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.