Skip to content
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

JSON file cannot be loaded and included correctly #191

Closed
LeVence1 opened this issue May 26, 2019 · 1 comment
Closed

JSON file cannot be loaded and included correctly #191

LeVence1 opened this issue May 26, 2019 · 1 comment

Comments

@LeVence1
Copy link

Hello,

I can't get it to work that the JSON file is loaded and mounted.

I checked different example codes and already debugged through the JavaScript code, but unfortunately I couldn't solve the problem.

function initialize() {
    let browserLanguage = getBrowserLanguage();
    if (isLanguageSupported(browserLanguage)) {
        $.i18n().load(languageFilePath + browserLanguage + ".json", browserLanguage);
        $.i18n().locale = browserLanguage;
        $('body').i18n();
    }
}

$(document).ready(function () {
    $.i18n.debug = true;
    initialize();
});
jquery.i18n.js:277 Loading messages from: /js/i18n/lang/de.json
jquery.i18n.js:277 Trying fallback locale for de: en (hometitle)
@Wasca
Copy link

Wasca commented Feb 22, 2021

@LeVence1 Did you ever get this working? I'm having the same problem as you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants