I know this is quite an old topic, but here is the explanation for this topic, because I had the same problem with Swiss language.
Seafile generates this HTML to open an office document with Collabora:
As you can see, seafile is generating a URL with the parameters for lang
, rs
and ui
.
lang, rs and ui are generated from your current seafile ui language. The mapping table can be found in seafile-server-latest/seahub/seahub/wopi/utils.py
and is looking like this:
lang_dict = {
"ar": "ar-SA",
"ca": "ca-ES",
"cs": "cs-CZ",
"de": "de-DE",
"el": "el-GR",
"en": "en-US",
"es": "es-ES",
"es-ar": "es-ES",
"es-mx": "es-ES",
"fi": "fi-FI",
"fr": "fr-FR",
"he": "he-IL",
"hu": "hu-HU",
"is": "is-IS",
"it": "it-IT",
"ja": "ja-JP",
"ko": "ko-KR",
"lv": "lv-LV",
"nl": "nl-NL",
"pl": "pl-PL",
"pt-br": "pt-BR",
"ru": "ru-Ru",
"sl": "sl-SI",
"sv": "sv-SE",
"th": "th-TH",
"tr": "tr-TR",
"uk": "uk-UA",
"vi": "vi-VN",
"zh-cn": "zh-CN",
"zh-tw": "zh-TW",
}
WOPI_UI_LLCC = lang_dict[language_code]
# `lang` parameter is used for Collabora Office
full_action_url += f'&ui={WOPI_UI_LLCC}&rs={WOPI_UI_LLCC}&lang={WOPI_UI_LLCC}'
From this, I don’t see any chance, that you get an en-UK
interface, because there is no mapping for that.
Nevertheless, here is a very dirty hack, if you’re using docker. As you can see, I add command
to replace the desired starting command and extend it with sed
.
services:
seafile:
image: ${SEAFILE_IMAGE:-datamate/seafile-professional:11.0.18}
restart: unless-stopped
container_name: seafile-server
command: |
sh -c "\
sed -i 's/de-DE/de-CH/g' /opt/seafile/seafile-pro-server-11.0.18/seahub/seahub/wopi/utils.py && \
/sbin/my_init -- /scripts/enterpoint.sh"
Now the interface language of collabora is independent of your seafile ui language. In my case it is only German (Switzerland).
Probably this will be customizable in the future.