Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GENERIC viewer] Try to fixup "incomplete" language codes (issue 13689)
While I don't know if it's technically correct to even do this, it could provide a slightly better out-of-the-box behaviour in browsers that specify (from the PDF.js `l10n`-folder perspective) "incomplete" language codes. Rather than immediately falling back to English, we'll use a white-list to try and re-write a "partial" language code to a (hopefully) suitable one that matches an existing `l10n`-folder. The disadvantage of this solution is that the list needs to be kept *manually* up-to-date with any changes in the `l10n`-folder, however new locales are added infrequently enough that this should be acceptable. Fixes 13689 (assuming we actually want/care to do so, otherwise we should just WONTFIX the issue).
- Loading branch information