2022-06-30 08:32:02 +02:00
(simple_translation)=
2021-04-14 09:56:00 +02:00
2022-06-30 08:32:02 +02:00
# Simple translation
2021-04-14 09:56:00 +02:00
The simple_translation module provides a user interface that allows users to copy pages and translatable snippets into another language.
2022-06-30 08:32:02 +02:00
- Copies are created in the source language (not translated)
- Copies of pages are in draft status
2021-04-14 09:56:00 +02:00
Content editors need to translate the content and publish the pages.
2022-06-30 08:32:02 +02:00
```{note}
Simple Translation is optional. It can be switched out by third-party packages. Like the more advanced [`wagtail-localize` ](https://github.com/wagtail/wagtail-localize ).
```
2021-04-14 09:56:00 +02:00
2022-06-30 08:32:02 +02:00
## Basic configuration
2021-04-14 09:56:00 +02:00
2022-06-30 08:32:02 +02:00
Add `"wagtail.contrib.simple_translation"` to `INSTALLED_APPS` in your settings file:
2021-04-14 09:56:00 +02:00
2022-06-30 08:32:02 +02:00
```python
INSTALLED_APPS = [
...
"wagtail.contrib.simple_translation",
]
```
2021-04-14 09:56:00 +02:00
2022-06-30 08:32:02 +02:00
Run `python manage.py migrate` to create the necessary permissions.
2021-04-14 09:56:00 +02:00
In the Wagtail admin, go to settings and give some users or groups the "Can submit translations" permission.
2021-09-29 12:43:45 +02:00
2022-06-30 08:32:02 +02:00
## Page tree synchronisation
2021-09-29 12:43:45 +02:00
Depending on your use case, it may be useful to keep the page trees in sync between different locales.
You can enable this feature by setting `WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE` to `True` .
2022-06-30 08:32:02 +02:00
```python
WAGTAILSIMPLETRANSLATION_SYNC_PAGE_TREE = True
```
2021-09-29 12:43:45 +02:00
When this feature is turned on, every time an editor creates a page, Wagtail creates an alias for that page under the page trees of all the other locales.
2022-06-30 08:32:02 +02:00
For example, when an editor creates the page `"/en/blog/my-blog-post/"` , Wagtail creates an alias of that page at `"/fr/blog/my-blog-post/"` and `"/de/blog/my-blog-post/"` .