Enabled available translations in settings.py. Honors Browser's preference.

This commit is contained in:
Marcus Scholz 2020-10-04 21:19:05 +02:00
parent 190eb5eef7
commit f592aba75d

View File

@ -18,6 +18,8 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
import os import os
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.utils.translation import gettext_lazy as _
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -125,6 +127,11 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
LANGUAGES = [
('de', _('German')),
('en', _('English')),
]
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/ # https://docs.djangoproject.com/en/3.1/howto/static-files/