From 1cda6505baf1095eaedae9d95e141ab88cca85a2 Mon Sep 17 00:00:00 2001 From: badguy001 Date: Wed, 18 Jun 2025 08:04:45 +0800 Subject: [PATCH] fix (language): wopi language - #845 According to the UI default language, the UI language of collabora/code must be explicitly specified within the URL( &lang=pt-BR ); otherwise, the UI language will always default to English (en). --- server/plugin/plg_editor_wopi/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/plugin/plg_editor_wopi/handler.go b/server/plugin/plg_editor_wopi/handler.go index 77541cc0..ebe471d6 100644 --- a/server/plugin/plg_editor_wopi/handler.go +++ b/server/plugin/plg_editor_wopi/handler.go @@ -282,6 +282,9 @@ func wopiDiscovery(ctx *App, fullpath string) (string, error) { p := u.Query() p.Set("WOPISrc", wopiSRC) p.Set("access_token", ctx.Authorization) + if len(ctx.Languages) > 0 { + p.Set("lang", ctx.Languages[0]) + } u.RawQuery = p.Encode() if newHost := rewrite_url(); newHost != "" { if p, err := url.Parse(newHost); err == nil {