v5.3.31 update, June 2025;
When trying to upgrade to the latest version (v5.3.31 as of 23/06/2025), I came across similar issues as with previous versions (above).
It looks like there's some lookups for locale in the code, but none worked for me if I used "#locale=" or "&locale=".
So I've added a similar workaround as above, but updated for the latest version;
In PDFjs/web/viewer.mjs;
Find localProperties, line 615;
localeProperties: {
value: {
lang: navigator.language || "en-US"
},
kind: OptionKind.BROWSER
},
Add an extra lookup above to check the URL for any locale's passed through, so change line 615+ to match;
localeProperties: {
value: {
lang: new URLSearchParams(window.location.search).get("locale") || navigator.language || "en-US"
},
kind: OptionKind.BROWSER
},
If there's a better way, someone do please let me know, but this small workaround resolved the issue for me.