Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeepL docs #5

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Create a `signals.py`:
```python
from django.dispatch import receiver
from wagtail.models import Page, TranslatableMixin
from wagtail_translate import Translator
from wagtail_translate.translators.rot13 import ROT13Translator as Translator
import django.dispatch

copy_for_translation_done = django.dispatch.Signal()
Expand Down Expand Up @@ -148,6 +148,14 @@ In Wagtail admin interface, go to the homepage `/admin/pages/2/`, in the dot-dot

The contents should be translated.

## Deepl

Install and configure [DeepL](https://www.deepl.com/) translator:

- `pip install deepl`
- Get a DeepL API key from https://www.deepl.com/pro#developer
- Add `WAGTAIL_TRANSLATE_DEEPL_KEY` to your settings.
- In your `signals.py`: `from wagtail_translate.translators.deepl import DeeplTranslator as Translator`

## Contributing

Expand Down