I’m using tap:i18n in a Meteor project. It works fine. Except not on Android.
When, on localhost, or after deploying to an iOS app, I switch languages, all is well.
When deploying to Android, the language switch fails.
I’ve got this as my language switch function:
TAPi18n.setLanguage(getUserLanguage())
.done(function () {
Session.set("showLoadingIndicator", false);
alert("Language is now " + getUserLanguage());
})
.fail(function (error_message) {
// Handle the situation
console.log(error_message);
alert("Could not set language to " + getUserLanguage());
alert(error_message);
});
The error message is this:
Couldn’t load language ‘pt’ JSON: error
The pt language file (pt.i18n) is this:
{
}
Yes, that language file is empty. It wasn’t before, so I figured something was preventing the JSON from being read properly. But, apparently, using an empty JSON string didn’t change anything.
I’m using version 1.8.2 of tap:i18n with Meteor 1.8.1, on Android 9.
What could be the cause? How to resolve this?