1
0
Fork 0
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:
Yury Delendik 2012-05-01 20:37:03 -05:00
parent e7f63e3e5e
commit 32e9eb35fe
3 changed files with 14 additions and 2 deletions

View file

@ -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');