mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Using web browsers locale in the extension mode
This commit is contained in:
parent
e7f63e3e5e
commit
32e9eb35fe
3 changed files with 14 additions and 2 deletions
|
@ -1347,8 +1347,11 @@ window.addEventListener('load', function webViewerLoad(evt) {
|
|||
if ('disableWorker' in hashParams)
|
||||
PDFJS.disableWorker = (hashParams['disableWorker'] === 'true');
|
||||
|
||||
var locale = !PDFJS.isFirefoxExtension ? navigator.language :
|
||||
FirefoxCom.request('getLocale', null);
|
||||
if ('locale' in hashParams)
|
||||
mozL10n.language.code = hashParams['locale'];
|
||||
locale = hashParams['locale'];
|
||||
mozL10n.language.code = locale;
|
||||
|
||||
if ('disableTextLayer' in hashParams)
|
||||
PDFJS.disableTextLayer = (hashParams['disableTextLayer'] === 'true');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue