Question about using i18n #51
-
I have been using this library for a long time, it is the best option for autocomplete fields in django, thank you @codingjoe for keeping this project alive. In my project I had a problem using the The language I use in my project is Brazilian ( Use cases: i18n_name = SELECT2_TRANSLATIONS.get(lang)
if i18n_name not in settings.SELECT2_I18N_AVAILABLE_LANGUAGES:
i18n_name = None
i18n_file = (
("%s/%s.js" % (settings.SELECT2_I18N_PATH, i18n_name),) if i18n_name else ()
)
# settings.py
LANGUAGE_CODE="pt-br"
# settings.py
LANGUAGE_CODE="pt-BR"
My solution I have in the project is as follows: LANGUAGE_CODE="pt-br" and html tag uses fixed configuration for select2 to work and not <html lang="pt-BR">
...
</html> Can this be a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @CleitonDeLima, Thank you for your kind words. And good point, that could be improved both in this package and in Django itself. If you open a bug with Django, please add me to cc, so I can do triage and provide a patch there too. Thanks! Best, |
Beta Was this translation helpful? Give feedback.
Hi @CleitonDeLima,
Thank you for your kind words. And good point, that could be improved both in this package and in Django itself. If you open a bug with Django, please add me to cc, so I can do triage and provide a patch there too. Thanks!
Best,
Joe