feat: enable translations
This commit is contained in:
parent
94482f1696
commit
e98db55a16
2 changed files with 21 additions and 1 deletions
|
@ -43,6 +43,7 @@ INSTALLED_APPS = [
|
|||
"wagtail.images",
|
||||
"wagtail.search",
|
||||
"wagtail.admin",
|
||||
"wagtail.locales",
|
||||
"wagtail",
|
||||
"modelcluster",
|
||||
"taggit",
|
||||
|
@ -68,6 +69,7 @@ MIDDLEWARE = [
|
|||
"django.middleware.security.SecurityMiddleware",
|
||||
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
|
||||
"blog.middleware.BlogRedirectMiddleware",
|
||||
"django.middleware.locale.LocaleMiddleware",
|
||||
"django_browser_reload.middleware.BrowserReloadMiddleware"
|
||||
]
|
||||
|
||||
|
@ -128,7 +130,7 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/5.0/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = "en-us"
|
||||
LANGUAGE_CODE = "en"
|
||||
|
||||
TIME_ZONE = "UTC"
|
||||
|
||||
|
@ -136,6 +138,16 @@ USE_I18N = True
|
|||
|
||||
USE_TZ = True
|
||||
|
||||
WAGTAIL_I18N_ENABLED = True
|
||||
|
||||
USE_L10N = True # allows dates to be shown in the user's locale
|
||||
|
||||
WAGTAIL_CONTENT_LANGUAGES = LANGUAGES = [
|
||||
('en', "English"),
|
||||
('fr', "French"),
|
||||
('es', "Spanish"),
|
||||
('nl', "Dutch"),
|
||||
]
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.0/howto/static-files/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue