(contributing_translations)=
Wagtail uses Transifex to translate the content for the admin interface. Our goal is to ensure that Wagtail can be used by those who speak many different languages. Translation of admin content is a great way to contribute without needing to know how to write code.
For translations and internationalisation of content made with Wagtail see [](internationalisation).
Wagtail is localised (translated) using Django's translation system and the translations are provided to and managed by Transifex, a web platform that helps organisations coordinate translation projects.
Translations from Transifex are only integrated into the repository at the time of a new release. When a release is close to being ready there will be a RC (Release Candidate) for the upcoming version and the translations will be exported to Transifex.
During this RC period, usually around two weeks, there will be a chance for all the translators to update and add new translations. We will also notify the #translators
channel in the Wagtail Slack group at this time.
These new translations are imported into Wagtail for any subsequent RC and the final release. If translations reach a threshold of about 80%, languages are added to the default list of languages users can choose from.
#translator
channel and introduce yourselfIn code, strings can be marked for translation with using Django's translation system, using gettext
or gettext_lazy
in Python and blocktranslate
and translate
in templates.
In both Python and templates, make sure to always use named placeholder. In addition, in Python, only use the printf style formatting. This is to ensure compatibility with Transifex and help translators in their work.
For example:
from django.utils.translation import gettext_lazy as _
# Do this: printf style + named placeholders
_("Page %(page_title)s with status %(status)s") % {"page_title": page.title, "status": page.status_string}
# Do not use anonymous placeholders
_("Page %s with status %s") % (page.title, page.status_string)
_("Page {} with status {}").format(page.title, page.status_string)
# Do not use positional placeholders
_("Page {0} with status {1}").format(page.title, page.status_string)
# Do not use new style
_("Page {page_title} with status {status}").format(page_title=page.title, status=page.status_string)
# Do not interpolate within the gettext call
_("Page %(page_title)s with status %(status)s" % {"page_title": page.title, "status": page.status_string})
_("Page {page_title} with status {status}".format(page_title=page.title, status=page.status_string))
# Do not use f-string
_(f"Page {page.title} with status {page.status_string}")