PHP code example of afsakar / filament-translate-action
1. Go to this page and download the library: Download afsakar/filament-translate-action library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
afsakar / filament-translate-action example snippets
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!
->