3
0

support i18n

This commit is contained in:
2022-04-07 13:26:52 +02:00
parent 99db542326
commit 71e7fe7b09
4 changed files with 98 additions and 1 deletions
+10 -1
View File
@@ -1,6 +1,6 @@
# python Captive Portal
### Installation
## Installation
Either clone repository (and install dependencies either through distribution or as virtualenv with `./setup-venv.sh`) or install as package.
@@ -8,3 +8,12 @@ Either clone repository (and install dependencies either through distribution or
pipx install https://github.tik.uni-stuttgart.de/NKS/python-capport
In production put a reverse proxy in front of the local web ui (on 127.0.0.1:8000), and handle `/static` path either to `src/capport/api/static/` or your customized version of static files.
## Customization
Create `custom/templates` and put customized templates (from `src/capport/api/templates`) there.
Create `i18n/<langcode>` folders to put localized templates into.
Requests with a `setlang=<langcode>` query parameter will set the language and try to store the choice in a session cookie.