nextcloud / officeonline

officeonline
46 stars 15 forks source link

fix: Do not always assume en-US as language if we cannot clearly determine #500

Closed juliushaertl closed 9 months ago

juliushaertl commented 9 months ago

Fix #100

Previously we try to match our language/locale setting to a predefined list, but with some like zh_CN we didn't find the supported zh-CN.

The office documentation points that any value can be passed over:

https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/online/discovery#ui_llcc

In addition to the values provided in the Locale ID column, you can supply any language, provided it's in the format described in RFC 1766. If you don't set a value for this placeholder, Office for the web tries to use the browser language setting (navigator.language). If no valid language can be determined, Office for the web defaults to en-US (US English).