Language problem

Does anyone know why I get this message?

select2.full.js:4907 Select2: The language file for “./i18n/de” could not be automatically loaded. A fallback will be used instead.

Now I get this message:
Violation] Added non-passive event listener to a scroll-blocking ‘wheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

The first message means that Select2 can’t load the language bundle for German. According to the Select2 Language documentation you should ensure you are loading the German language file after you load select2.full.js in your web page.

The second message probably is not coming from Select2, as I am not aware of any wheel event handlers in Select2. The message is basically Chrome complaining that an event handler for the wheel event is non-passive, which tends to make page scrolling jumpy. Unless you wrote the event handler, you don’t need to worry about that message.

Hi John, thank you for the answer.

I have an other question: is it possible to load the language file dynamically depending on witch language is set in the database?

Thank you,
Reinhard

The 2nd message was because I used select2.full.js, I believe. First I used an text field which does not work.
Then I used a which do work for me. I found it in a forum, only treyd it and it works.

Thank you,
Reinhard

Yes. Just initialize the Select2, specifying the language you want, after you have retrieved the desired language from the database.

If the Select2 is already initialized and you need to change the language from what it currently is, you can just re-initalize the Select2, specifying the new language.