Replies: 1 comment
-
I will open a feature request for this. seems only 1 link tag is retrieved by viewer.mjs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Attach (recommended) or Link to PDF file here:
Configuration:
This is more of a question if it is possible or not (if not, then ill create a feature request) or what I could be doing wrong if one should be able to add custom translations. Back then in webL10n, i just add my own locale property language files in a different folder
e.g.
/custom-folder/locale/en.properties , de.properties, locale.properties (content is same format as viewer's locale.properties).
and then add another tag in the html file
<link rel="resource" type="application/l10n" href="../web/locale/locale.properties"/>
now, in v4, im struggling to find out how to. when i add
<link rel="resource" type="application/l10n" href="locale/locale.json"/>
before the link l10n tag of pdf and the ftl files are in a custom folder, thee translations of even pdf.js do not work.
If i do not place my add-on < link > tag or after the < link> tag l10n of pdf.js, it works ok.
but if i try to get the translation in the custom ftl file by PDFViewerApplication.l10n.get(keyname), it is undefined.
Steps to reproduce the problem:
<link rel="resource" type="application/l10n" href="custom-locale/locale.json"/>
"de": "de.ftl",
"en": "en.ftl",
"en-us": "en.ftl"
}
What is the expected behavior? (add screenshot)
Expected behavior is that it should load all the translations even if there are 2 link tags of locale.json pointing to differetn paths.
What went wrong? (add screenshot)
Even the translations of pdf.js do not work after i add the tag.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions