I want to create a jQuery multilingual plugin. I also want to open the language files containing the "object" inside my plugin function and access its content.
$.getScript('lang/' + settings.language + '.js').done(function() {
console.log('loaded this');
}).fail(function() {
consoleError('language file does not exist!');
});
The above code gives me the following error.
SyntaxError: expected expression, got '<'
Can you make a suggestion?