%PDF-1.4 %Óëéá 1 0 obj <> endobj 3 0 obj <> endobj 4 0 obj <
| Server IP : 212.252.79.165 / Your IP : 216.73.217.172 [ Web Server : Apache System : Linux 212-252-79-165.cprapid.com 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 User : cehaburo ( 1001) PHP Version : 8.1.33 Disable Function : exec,passthru,shell_exec,system Domains : 48 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/cehaburo/www/pdfjs/samples/customization/internationalization/ |
Upload File : |
// @link WebViewerInstance: https://www.pdftron.com/api/web/WebViewerInstance.html
// @link UI.setLanguage: https://www.pdftron.com/api/web/UI.html#setLanguage__anchor
WebViewer(
{
path: '../../../lib',
additionalTranslations: {
language: 'en',
translations: { 'option.toolbarGroup.toolbarGroup-View': 'Edited View Label' },
},
initialDoc: 'https://pdftron.s3.amazonaws.com/downloads/pl/demo-annotated.pdf',
},
document.getElementById('viewer')
).then(instance => {
samplesSetup(instance);
document.getElementById('form').onchange = e => {
// Set language
instance.UI.setLanguage(e.target.id);
};
// To Create a new button into the settings menu and set the translation
instance.UI.settingsMenuOverlay.add(
{
type: 'actionButton',
className: 'row',
dataElement: 'languageButton',
label: 'Language',
},
'downloadButton'
);
});