stellR42 / vue3-pdf-app

Vue 3 PDF viewer based on Mozilla's PDFJS
MIT License
82 stars 28 forks source link

i10n doesnot work well #10

Closed maxrks closed 1 year ago

maxrks commented 1 year ago

This package is excellent! There might be a bug related to internationalization (i10n) when importing the i10n module.

by the instruction, add the markup into index.html <link rel="resource" type="application/l10n" href="./viewer.properties" /> then reload the current workspace, the pdf viewer would work at first, but a second time the viewer's content would be blank.

Snipaste_2023-07-17_12-29-22

It appears that some key-value pairs are missing in the viewer.properties file. I attempted to add them, but they did not have the desired effect or did not work as expected.

stellR42 commented 1 year ago

The viewer.properties file is not included.

  1. Take a desired locale from here
  2. Copy paste it into a file in your project (locale.txt for instance)
  3. Add <link rel="resource" type="application/l10n" href="path-to-the-locale.txt" /> into your html