aboutsummaryrefslogtreecommitdiff
path: root/internal/web/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/server.go')
-rw-r--r--internal/web/server.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/web/server.go b/internal/web/server.go
index 5ebed38..a586534 100644
--- a/internal/web/server.go
+++ b/internal/web/server.go
@@ -345,6 +345,9 @@ func readingsHandler(cfg config.Config) http.HandlerFunc {
// date/lectionary/all/version resolution as the reading pane.
func exportHandler(cfg config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
+ if l := r.URL.Query().Get("lang"); l != "" {
+ cfg.UILanguage = config.NormalizeUILanguage(l)
+ }
date, lectionary, all, versions, _ := resolveQuery(cfg, r)
secs, dayInfo, loadVersions, err := loadSections(cfg, lectionary, date, all, versions)
if err != nil {
@@ -387,6 +390,9 @@ func exportHandler(cfg config.Config) http.HandlerFunc {
// bad month defaults to the current month.
func calendarHandler(cfg config.Config) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
+ if l := r.URL.Query().Get("lang"); l != "" {
+ cfg.UILanguage = config.NormalizeUILanguage(l)
+ }
t, err := time.Parse("2006-01", r.URL.Query().Get("month"))
if err != nil {
t = time.Now()