-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 error when configuring a single language #150
Comments
Looks like a bug. Maybe I've introduced it when improving the i18n algorithm. As a workaround, you can add the locale Json to the |
…orry, dear Canadians, for changing the default - I love your country, but I think it makes sense to follow the population size and to follow the standards set by major companies like Microsoft).
… if there's already a more specifiy file (e.g. "en-GB.properties")
… if there's already a more specifiy file (e.g. "en-GB.properties")
I believe to have successfully solved your issue with version 1.6.0-rc.1. Would you mind to run a test? There are still unsolved edge cases, such as languages like "en-NONSENSE" which don't exist, but I guess we can get away with ignoring these edge cases. |
The PDF displays now, but there is a console error: zone-evergreen.js:2828 GET http://localhost:4201/assets/locale/en-US/viewer.properties 404 (Not Found) I have to support IE11, so switched to the es5 version of the scripts. |
Oops - same here. Both with the IE11 version and the ES2015 version. |
… if there's already a more specific file (e.g. "en-GB.properties") (this time for real)
Now I'm positive I've solved the issue. Would you mind to test again? Thanks, |
I am having the same issue when I tried to configure single language - en-US. PDF loads for me but local.properties logs console error as 404 along with more than 250 warnings which is not good for an application anyways. Some are: viewer.min.js:21 "en" resource not found Angular.json { |
@NishadAbdul Strange. I believe you approach works, but maybe you've missed a file or a folder. In general, I recommend simply copying the entire assets folder, as described here: https://pdfviewer.net/getting-started That approach adds a few hundred kilobytes to your assets folder, but unless you wrap it into a Cordova app, that's no disadvantage. The clients only loads the files it really needs. If you're sure you need only a single language, there's a better approach. The folder If you're unhappy to put the JSON file into the |
In the docs it says the following:
If you need only one language, you can reduce the list to locale.properties and your language folder.
I'm getting the following error when trying to only support a single language:
zone-evergreen.js:2828 GET http://localhost:4201/assets/locale/en-CA/viewer.properties 404 (Not Found)
Here is my html markup:
angular.json:
Is this a bug or is the config incorrect? I don't know why it's looking for en-CA.
The text was updated successfully, but these errors were encountered: