Add en.js to solution


Hi All. I’m receiving an error
Exception was thrown at line 97, column 21 in http://localhost/blablabla/scripts/Plugin/select2/select2.full.min.js
" JavaScript runtime error: No en ".
Can’t make it work.
en.js is added to solution


Are you specifying a language in your Select2 initialization call? Assuming you need English, then there is no need to explicitly set the language in the initializer call.


No, I’m not specifying language, and if i’m not mistaken “en” is set as default for select2?


That’s correct, assuming you’re issuing a standard build of Select2.


If I don’t identify language, “En” is set by default. So added en.js file, but still receive same error. Is it possible that the location if en.js file is wrong?


I suppose it’s possible. What version of Select2 are you using? And have you loaded jQuery before loading Select2?


I’m using Select2 4.0.11. And control itself is working properly, is loaded correctly. The only issue is that I continue receiving this error message if I’m in debug mode.


In the network tab of the developer console, do you see a connection attempt for en.js?

If not, my guess is that the build you’re using is defective. I know there are some issues with some more recent builds. You might try to go back to a lower-level build. I find 4.0.6rc1 works pretty well.