|
@@ -27,7 +27,7 @@ There are two options for managing translations across different languages in th
|
|
|
|
|
|
This document only covers the internationalisation of content managed by Wagtail.
|
|
|
For information on how to translate static content in template files, JavaScript
|
|
|
-code, etc, refer to the [Django internationalisation docs](https://docs.djangoproject.com/en/3.1/topics/i18n/translation/).
|
|
|
+code, etc, refer to the [Django internationalisation docs](https://docs.djangoproject.com/en/stable/topics/i18n/translation/).
|
|
|
Or, if you are building a headless site, refer to the docs of the frontend framework you are using.
|
|
|
|
|
|
### Wagtail's approach to multi-lingual content
|
|
@@ -241,7 +241,7 @@ To allow all of the page trees to be served at the same domain, we need
|
|
|
to add a URL prefix for each language.
|
|
|
|
|
|
To implement this, we can use Django's built-in
|
|
|
-[i18n_patterns](https://docs.djangoproject.com/en/3.1/topics/i18n/translation/#language-prefix-in-url-patterns)
|
|
|
+[i18n_patterns](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#language-prefix-in-url-patterns)
|
|
|
function, which adds a language prefix to all of the URL patterns passed into it.
|
|
|
This activates the language code specified in the URL and Wagtail takes this into
|
|
|
account when it decides how to route the request.
|
|
@@ -408,7 +408,7 @@ This `for` block iterates through all published translations of the current page
|
|
|
```
|
|
|
|
|
|
This is a Django built-in tag that gets info about the language of the translation.
|
|
|
-For more information, see [get_language_info() in the Django docs](https://docs.djangoproject.com/en/3.1/topics/i18n/translation/#django.utils.translation.get_language_info).
|
|
|
+For more information, see [get_language_info() in the Django docs](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#django.utils.translation.get_language_info).
|
|
|
|
|
|
```html+django
|
|
|
<a href="{% pageurl translation %}" rel="alternate" hreflang="{{ language_code }}">
|
|
@@ -427,7 +427,7 @@ languages and finds the page for each one. This works better than the [Basic exa
|
|
|
above on sites that have extra Django `LANGUAGES` that share the same Wagtail content.
|
|
|
|
|
|
For this example to work, you firstly need to add Django's
|
|
|
-[django.template.context_processors.i18n](https://docs.djangoproject.com/en/3.1/ref/templates/api/#django-template-context-processors-i18n)
|
|
|
+[django.template.context_processors.i18n](https://docs.djangoproject.com/en/stable/ref/templates/api/#django-template-context-processors-i18n)
|
|
|
context processor to your `TEMPLATES` setting:
|
|
|
|
|
|
```python
|