mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
fix(wopi): cannot set preferred language for LibreOffice online
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user