-
Notifications
You must be signed in to change notification settings - Fork 7
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
Language change does not work if this package is used #2
Comments
I found out what the problem was. In the project-tap.i18n file, it should read: {
"cdn_path" : "/i18n"
} The package always tried to get the language files relative to the current URL. I recommend to update the docs. |
I would maybe suggest to improve the error message when there are issues in the |
Thanks for the suggestion @JesperWe; this is a http://github.com/tapevents/tap-i18n (main repo) issue. Would certainly be useful to have better error messages. Can you confirm whether or not it's working now? If so, I'll close the issue. |
Sure, it works if you get the cdn_path settings right. But if you don't it just silently fails without any message. |
I was glad that this package was there, since I would like to support my Cordova app with offline language files. Setup was easy, and the i18n files are generated as expected. They are located in the /public/i18n folder, and they contain the right keys.
However, my application always shows up in English. Switching the language using TAPi18n.setLanguage() does not seem to work anymore. I can see in the browser's networking console that the language files are retrieved from the server, but then nothing happens.
The fail() callback says:
I ran a JSON linter on it, and it reported the JSON as being clean.
The language dropdown provided by tap:i18n also does not have any effect.
What may cause this?
I kept the
project-tap.i18n
file lean, it just contains thecdn_path
required for this package.The text was updated successfully, but these errors were encountered: