|
@@ -447,20 +447,10 @@ if (typeof PDFJS === 'undefined') {
|
|
|
|
|
|
// Checks if navigator.language is supported
|
|
|
(function checkNavigatorLanguage() {
|
|
|
- if ('language' in navigator &&
|
|
|
- /^[a-z]+(-[A-Z]+)?$/.test(navigator.language)) {
|
|
|
+ if ('language' in navigator) {
|
|
|
return;
|
|
|
}
|
|
|
- function formatLocale(locale) {
|
|
|
- var split = locale.split(/[-_]/);
|
|
|
- split[0] = split[0].toLowerCase();
|
|
|
- if (split.length > 1) {
|
|
|
- split[1] = split[1].toUpperCase();
|
|
|
- }
|
|
|
- return split.join('-');
|
|
|
- }
|
|
|
- var language = navigator.language || navigator.userLanguage || 'en-US';
|
|
|
- PDFJS.locale = formatLocale(language);
|
|
|
+ PDFJS.locale = navigator.userLanguage || 'en-US';
|
|
|
})();
|
|
|
|
|
|
(function checkRangeRequests() {
|