https://github.com/litstack/deeplable
https://github.com/litstack/deeplable
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/litstack/deeplable
- Owner: litstack
- Created: 2021-09-01T07:12:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-28T10:57:49.000Z (over 2 years ago)
- Last Synced: 2025-01-15T11:12:24.427Z (about 1 year ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Litstack Deeplable - DeepL Translator
A package to automatically translate [CRUD models](https://litstack.io/docs/crud/model) and [forms](https://litstack.io/docs/crud/forms) in litstack via the DeepL api.
## Setup
Install the package via composer.
```shell
composer require litstack/deeplable
```
Please follow the steps for setting up the [aw-studio/laravel-deeplable](https://github.com/aw-studio/laravel-deeplable) package.
## Usage
The package ships with 2 actions:
- `Litstack\Deeplable\TranslateAction` - Translates a single model/form
- `Litstack\Deeplable\TranslateAllAction` - Translates all models configured in the `deeplable.models` config
Example:
```php
$page->headerLeft()->action('Übersetzen', TranslateAction::class);
```
You may add the following models to the `deeplable.models` config:
- `Ignite\Crud\Models\Form`
- `Ignite\Crud\Models\Repeatable`