added multilanguage config to wagtail
This commit is contained in:
parent
af3b7da461
commit
be76574eeb
|
|
@ -31,7 +31,7 @@ DEBUG = env.bool("VBV_DJANGO_DEBUG", False)
|
||||||
# In Windows, this must be set to your system time zone.
|
# In Windows, this must be set to your system time zone.
|
||||||
TIME_ZONE = "Europe/Zurich"
|
TIME_ZONE = "Europe/Zurich"
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code
|
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code
|
||||||
LANGUAGE_CODE = "en-us"
|
LANGUAGE_CODE = "de-CH"
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id
|
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
|
# https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
|
||||||
|
|
@ -95,6 +95,7 @@ THIRD_PARTY_APPS = [
|
||||||
'wagtail.search',
|
'wagtail.search',
|
||||||
'wagtail.admin',
|
'wagtail.admin',
|
||||||
'wagtail.core',
|
'wagtail.core',
|
||||||
|
'wagtail.locales',
|
||||||
|
|
||||||
'modelcluster',
|
'modelcluster',
|
||||||
'taggit',
|
'taggit',
|
||||||
|
|
@ -188,14 +189,36 @@ STATICFILES_FINDERS = [
|
||||||
MEDIA_ROOT = str(APPS_DIR / "media")
|
MEDIA_ROOT = str(APPS_DIR / "media")
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
|
# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
|
||||||
MEDIA_URL = "/media/"
|
MEDIA_URL = "/media/"
|
||||||
WAGTAIL_SITE_NAME = 'VBV Lernwelt'
|
|
||||||
|
|
||||||
|
|
||||||
|
# WAGTAIL
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
WAGTAIL_SITE_NAME = 'VBV Lernwelt'
|
||||||
|
WAGTAIL_I18N_ENABLED = True
|
||||||
|
|
||||||
|
LANGUAGES = [
|
||||||
|
('en-US', "English (American)"),
|
||||||
|
('fr-CH', "Swiss French"),
|
||||||
|
('de-CH', "Swiss German"),
|
||||||
|
('it-CH', "Swiss Italian")
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
WAGTAIL_CONTENT_LANGUAGES = [
|
||||||
|
('fr-CH', "Swiss French"),
|
||||||
|
('de-CH', "Swiss German"),
|
||||||
|
('it-CH', "Swiss Italian")
|
||||||
|
]
|
||||||
|
|
||||||
WAGTAILSEARCH_BACKENDS = {
|
WAGTAILSEARCH_BACKENDS = {
|
||||||
'default': {
|
'default': {
|
||||||
'BACKEND': 'wagtail.search.backends.database',
|
'BACKEND': 'wagtail.search.backends.database',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TEMPLATES
|
# TEMPLATES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
# https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue