mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
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).
This commit is contained in:
parent
609fc607c2
commit
1cda6505ba
1 changed files with 3 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue