Closed MastaBaba closed 11 months ago
I resolved this by removing tap:i18n, replacing it with my own translation function. Like so:
Template.registerHelper('_', function(reference) {
var strings = [];
strings["en"] = {
"identifier_1": "string 1 in English",
...
}
strings["pt"] = {
"identifier_1": "string 1 in Portuguese.",
...
}
var language = getSetting("language");
return strings[language][reference];
})
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:
The error message is this:
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?