Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Internationalization: changing the language in PDF Viewer

This JavaScript sample lets you change the language displayed in tooltips when viewing documents in PDF Viewer. Compatible with all browsers (including IE11) and mobile devices without using plug-ins. Launch the Internationalization Demo to see an example of how you can toggle between English, French and Chinese Simplified in WebViewer. Learn more about our JavaScript PDF Library.

Get Started Samples Download

To run this sample, get started with a free trial of Apryse SDK.



    path: '../../../lib',
    additionalTranslations: {
      language: 'en',
      translations: { 'option.toolbarGroup.toolbarGroup-View': 'Edited View Label' },
    webviewerServerURL: '', // comment this out to do client-side only
    initialDoc: '',
).then(instance => {

  const currentLanguage = instance.UI.getCurrentLanguage();
  const radioButton = document.querySelector(`form > #${currentLanguage}`);
  if (radioButton) {
    radioButton.checked = true;

  document.getElementById('form').onchange = e => {
    // Set language