Translation plugin for Wagtail CMS
Project description
Wagtail localize
Supported versions:
Python: 3.7 and 3.8 Django: 2.2, 3.0 and 3.1 Wagtail: 2.11
Installation and setup
Install with pip:
pip install wagtail-localize
Settings modifications
Add wagtail_localize and wagtail_localize.locales to INSTALLED_APPS in settings/base.py:
INSTALLED_APPS = [
...
"wagtail_localize",
"wagtail_localize.locales", # Note: This replaces "wagtail.locales"
...
]
Add the following to MIDDLEWARE:
"django.middleware.locale.LocaleMiddleware",
Ensure your settings file has:
LANGUAGE_CODE = "en-gb" # Or your preferred default language
USE_I18N = True
Add to following to your settings specifying any languages you would like to translate:
LANGUAGES = [
("en", "English"),
("fr", "French"),
]
To enable DeepL as a machine translator, add the following to your settings:
WAGTAILLOCALIZE_MACHINE_TRANSLATOR = {
'CLASS': 'wagtail_localize.machine_translators.deepl.DeepLTranslator',
'OPTIONS': {
'AUTH_KEY': '<Your DeepL key here>',
}
}
URL configuration
The following additions need to be made to ./yoursite/urls.py
from django.conf.urls.i18n import i18n_patterns
...
urlpatterns += i18n_patterns(
url(r"^search/$", search_views.search, name="search"),
url(r"", include(wagtail_urls)),
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail-localize-0.9.3.tar.gz.
File metadata
- Download URL: wagtail-localize-0.9.3.tar.gz
- Upload date:
- Size: 129.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c94772fec2ca39f310767be30d65eb4b4cd8946c9f771520ea1523ba372e5796
|
|
| MD5 |
b8d4583f3a9fbd453443d78d1f89c8b6
|
|
| BLAKE2b-256 |
fc6fabc91d7d302a075959817be7f758608408809e179a324fe1cce2b22cd658
|
File details
Details for the file wagtail_localize-0.9.3-py3-none-any.whl.
File metadata
- Download URL: wagtail_localize-0.9.3-py3-none-any.whl
- Upload date:
- Size: 189.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a966449a31d32bf5eba960bcdc72c234f498210d8204eaf5ec15e2021068851
|
|
| MD5 |
af75e7daabec5f9b5288c320eb7c3a92
|
|
| BLAKE2b-256 |
313849f7ebb3a7de76fca06ae03dbe003cf52a29abfc00a0f9fa794582bf076e
|