Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afsakar/filament-translate-action
Translate action for FilamentPHP
https://github.com/afsakar/filament-translate-action
filamentphp filamentphp-plugin google-translate laravel laravel-package translate
Last synced: 4 days ago
JSON representation
Translate action for FilamentPHP
- Host: GitHub
- URL: https://github.com/afsakar/filament-translate-action
- Owner: afsakar
- License: mit
- Created: 2023-11-13T16:39:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-10T19:03:41.000Z (4 months ago)
- Last Synced: 2025-01-15T21:14:43.385Z (11 days ago)
- Topics: filamentphp, filamentphp-plugin, google-translate, laravel, laravel-package, translate
- Language: PHP
- Homepage: https://filamentphp.com/plugins/afsakar-translate-action
- Size: 2.45 MB
- Stars: 35
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Translate action for FilamentPHP
[![Latest Version on Packagist](https://img.shields.io/packagist/v/afsakar/filament-translate-action.svg?style=flat-square)](https://packagist.org/packages/afsakar/filament-translate-action)
[![Total Downloads](https://img.shields.io/packagist/dt/afsakar/filament-translate-action.svg?style=flat-square)](https://packagist.org/packages/afsakar/filament-translate-action)![Screenshot](https://banners.beyondco.de/Filament%20Translate%20Action.png?theme=light&packageManager=composer+require&packageName=afsakar%2Ffilament-translate-action&pattern=architect&style=style_2&description=Translate+action+for+FilamentPHP&md=1&showWatermark=1&fontSize=100px&images=https%3A%2F%2Flaravel.com%2Fimg%2Flogomark.min.svg)
This package provides a simple action to translate fields in FilamentPHP.
## Installation
You can install the package via composer:
```bash
composer require afsakar/filament-translate-action
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="filament-translate-action-config"
```This is the contents of the published config file:
```php
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',
],
];
```## Usage
```php
...RichEditor::make('body')
->label('Body')
->translatable() // add this line to make field translatable. That's it!
->required(),
...
```## Screenshot
![Screenshot](https://raw.githubusercontent.com/afsakar/filament-translate-action/main/art/filament-translatable-action.gif)
## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Azad Furkan ŞAKAR](https://github.com/afsakar)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.