added translations

This commit is contained in:
Joren de Graaf
2026-10-01 22:43:45 +02:00
parent 2c4cd61a63
commit 5410fec8f2
76 changed files with 1787 additions and 291 deletions
Binary file not shown.
Binary file not shown.
+6 -1
View File
@@ -54,9 +54,11 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'members.middleware.UserLanguageMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
@@ -114,7 +116,10 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/6.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'nl'
LANGUAGES = [('nl', 'Nederlands'), ('en', 'English')]
LANGUAGE_COOKIE_AGE = 365 * 24 * 60 * 60
LOCALE_PATHS = [BASE_DIR / 'locale']
TIME_ZONE = 'UTC'
+2
View File
@@ -8,8 +8,10 @@ from django.views.static import serve
from fireworks_detect.views import dashboard_view
from hello.views import hello_view
from members.language_views import set_anonymous_language
urlpatterns = [
path("language/", set_anonymous_language, name="set_anonymous_language"),
path("admin/", admin.site.urls),
path("login/", auth_views.LoginView.as_view(template_name="members/login.html"), name="login"),
path("classifications/", include("fireworks_detect.classification_urls")),