You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select2.full.js:5181 Select2: The language file for "./i18n/zh" could not be automatically loaded. A fallback will be used instead. How to eliminate this warn ?
#1386
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.
i set html lang ="zh-CN" in my base.html and set meta charset="utf-8" in head
My problem :
I got the waring in browser when i use widgets for my form's field by 3td party plugin autocomplete.ModelSelect2() in ModelForm and render by django template {{ form media }} , although there is an warning message, the function is work , the result message of the select button show my language .
warning message: Select2: The language file for "./i18n/zh" could not be automatically loaded. A fallback will be used instead.
I have checked the html code of the page , The path to the file is correct..
Uh oh!
There was an error while loading. Please reload this page.
My Django Project config :
Django 4.2.17
Django-autocomplete-light plugin 3.12.1
LANGUAGE_CODE = "zh-hans" in settings.py
USE_I18N = True
disable local translation middleware
in My Django template , base.html
i set html lang ="zh-CN" in my base.html and set meta charset="utf-8" in head
My problem :
I got the waring in browser when i use widgets for my form's field by 3td party plugin autocomplete.ModelSelect2() in ModelForm and render by django template {{ form media }} , although there is an warning message, the function is work , the result message of the select button show my language .
warning message: Select2: The language file for "./i18n/zh" could not be automatically loaded. A fallback will be used instead.
I have checked the html code of the page , The path to the file is correct..
render by Django Template {{ form.media }}
<script src="/static/admin/js/vendor/select2/select2.full.js"></script> <script src="/static/autocomplete_light/autocomplete_light.js"></script> <script src="/static/autocomplete_light/select2.js"></script> <script src="/static/autocomplete_light/i18n/zh-CN.js"></script> --------------------------------------------------------If i use the low case language file settings , like en.js eu.js ... , anything is normal , no warning message yet .
but when i change back to zh-CN.js zh-TW.js pt-BR.js ....I will get the waring message again
what can i do to settle this warning ?
The text was updated successfully, but these errors were encountered: