fix(wopi): cannot set preferred language for LibreOffice online

pull/1690/head
Aaron Liu 2 years ago
parent f172220825
commit da1eaf2d1f

@ -59,6 +59,7 @@ const (
wopiSrcPlaceholder = "WOPI_SOURCE"
wopiSrcParamDefault = "WOPISrc"
languageParamDefault = "lang"
sessionExpiresPadding = 10
wopiHeaderPrefix = "X-WOPI-"
)
@ -214,6 +215,9 @@ func generateActionUrl(src string, fileSrc string) (*url.URL, error) {
queryReplaced.Set(wopiSrcParamDefault, fileSrc)
}
// LibreOffice require this flag to show correct language
queryReplaced.Set(languageParamDefault, "lng")
actionUrl.RawQuery = queryReplaced.Encode()
return actionUrl, nil
}

Loading…
Cancel
Save