Tap-i18n-bundler: trying to bundle the language files

Hi,

We’ve been using tap-i18n for years now and we often get comments from our mobile users that the default language is being used instead of their preferred one.

We’ve found that when the mobile network is slow or intermittent, this happens.

So we thought of bundling the language files with tap-i18n-bundler but :

1-When we add this to the config as they say:
project-tap.i18n // see tap:i18n
{ “cdn_path” : “i18n” }
result: only the default language files gets loaded as the http request to load the fr.json file gets a 404 (from meteor)

2-If we don’t set cdn_path, well, it’s just like before, it works when the network is strong

Any idea how to make this work ?

Regards,

Burni

a little more detail:

in a browser or app, when loading the language this way:

                        TAPi18n.setLanguage(window.global_current_employee.language)
                            .done(function () {
                                Session.set("TAPi18nLanguageLoading", false);
                            })
                            .fail(function (error_message) {
                                console.log(error_message);
                            });

we get this error: Couldn’t load language ‘fr’ JSON: parsererror

And we do not see any network request trying to load it. It’s like it could not find the file?

Nobody has done that before ? :frowning:

Hi,

I’ve got some improvements but I have not managed to make it work.

1-We have a problem only with Cordova when it tries to fetch the file, it gets a CORS error as the origin is http://localhost:12480 and not the same https website https://app.gjajagaj.com/i18n/fr.json

2-If it tries to fetch the file through a URL, it means it’s not offline. So it kind of means the purpose of the i18n-bundler is not working !?

Best regards,

Burni