How To Change Wagtail's Default Language?
I'm using headless Wagtail and want to change the default backend language to Portuguese (pt-pt). Following wagtail's docs: # settings.py USE_I18N = True LANGUAGE_CODE = 'pt-pt'
Solution 1:
You're following documentation from Wagtail 2.0, which is very outdated. The documentation for Wagtail 2.11's internationalisation support (unreleased at the time of writing) can be found here: https://docs.wagtail.io/en/latest/advanced_topics/i18n.html
As mentioned there, when you configure languages in your settings file you also need to set up Locale records in the database. This can be done in a data migration, or by enabling the wagtail.locales
app and going through the Settings -> Locales area in the admin:
INSTALLED_APPS = [
# ...'wagtail.locales',
# ...
]
Post a Comment for "How To Change Wagtail's Default Language?"