-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Localization does not work for sv (Swedish) in Edge (but does in Chrome that reports sv-SE). #13689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This does seem like more a Microsoft Edge issue, rather than a PDF.js one.
That's how things have been since the very beginning of this project, hence I'm not sure that we necessarily want to make any changes here (since that may cause regressions elsewhere). There's basically three possible ways to address this:
|
I agree that this is primarliy an Edge issue. However, on a few random machines with different Edge versions I've tried, The main question might be whether to support the default Edge behaviour in pdf.js or not, as average users will not configure their browser to emit another language/region. Those who are able to, probably prefer English to Swedish anyway. For me, this is not an issue at all. I just wanted to let you know. If I bother fixing it, I'll probably just copy the folder to solve the minor problem. |
I suppose that another possible option could be to try and fixup these "incomplete" language codes, however I don't know if this is a desirable change (for the PDF.js project) and more importantly if this is actually a specification compliant way of handling language codes; e.g. something like master...Snuffleupagus:issue-13689 |
That would of course solve the problem, but as you say, is it the proper way of handling the issue and is it is a desirable change in PDF.js? I can't really tell. It is weird that Edge behaves differently than other browsers. There is also very little information/discussion on this topic. I spent an hour on google-fu and didn't find anything useful. |
The PR above should have fixed this if I look at https://github.com/mozilla/pdf.js/pull/13696/files#diff-51a0dde82a8d1b56568a0375e28fccde02bc154a89b3cb92f34f090b5219b62aR100. Are you sure you're using the latest PDF.js version? |
Yes, was fixed. |
Configuration:
Steps to reproduce the problem:
What is the expected behavior?
The viewer should be localized, i.e. translated to Swedish.
What went wrong? (add screenshot)
The viewer is translated to Swedish in Chrome, but not in Edge.
Request headers:
Accept-Language: sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7
Accept-Language: sv,en;q=0.9,en-GB;q=0.8,en-US;q=0.7
The problem seems to be that the
l10n
folder does not contain ansv
folder, but only ansv-SE
.The text was updated successfully, but these errors were encountered: