From e2e5ed9aa345f86a58ec7838b6a23fc1b3d6bda0 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 20 Jan 2022 16:04:42 -0800 Subject: [PATCH] Makes default language configurable --- .env.example | 2 ++ bookwyrm/settings.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 2000a7165..ca6f65bb7 100644 --- a/.env.example +++ b/.env.example @@ -8,6 +8,8 @@ USE_HTTPS=true DOMAIN=your.domain.here EMAIL=your@email.here +# Instance defualt language (see options at bookwyrm/settings.py "LANGUAGES" +LANGUAGE_CODE="en-us" # Used for deciding which editions to prefer DEFAULT_LANGUAGE="English" diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 197e672c1..e86d27928 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -243,7 +243,7 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/ -LANGUAGE_CODE = "en-us" +LANGUAGE_CODE = env("LANGUAGE_CODE", "en-us") LANGUAGES = [ ("en-us", _("English")), ("de-de", _("Deutsch (German)")),