mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 16:25:33 +01:00
add initial localization support for the front end #215
This commit is contained in:
parent
d909010f08
commit
5395208b00
5 changed files with 26 additions and 5 deletions
|
|
@ -6,6 +6,8 @@ import re
|
|||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# Tap paperless.conf if it's available
|
||||
if os.path.exists("../paperless.conf"):
|
||||
load_dotenv("../paperless.conf")
|
||||
|
|
@ -117,6 +119,7 @@ MIDDLEWARE = [
|
|||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
|
|
@ -246,6 +249,11 @@ if os.getenv("PAPERLESS_DBHOST"):
|
|||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
LANGUAGES = [
|
||||
("en-us", _("English")),
|
||||
("de", _("German"))
|
||||
]
|
||||
|
||||
TIME_ZONE = os.getenv("PAPERLESS_TIME_ZONE", "UTC")
|
||||
|
||||
USE_I18N = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue