--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/aa5f8eb8-4ad3-e52b-16b8-38aa911a7c2e%40sionneau.net.
Hi,
Thanks Adam for your quick answer!
I investigated this a bit more in depth.
It seems that Django cannot use any translation that the visitor would want (via cookie or via Accept-Language header) if the language code is not in settings.LANGUAGES.
If I read documentation about settings.LANGUAGES : https://docs.djangoproject.com/en/2.2/ref/settings/#languages
it says :
"Generally, the default value should suffice. Only set this setting if you want to restrict language selection to a subset of the Django-provided languages."
So the documentation is talking about *restricting* the list, not expanding it.
Anyway, I tried to expand it, it seemed to work.
I did this in my settings file:
LANGUAGES.append( ('oc', gettext_lazy('Occitan')), )
Would you say that my understanding is correct? Is my solution correct? The best one?
Thanks!
Yann
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM1YDoNw1%3D21E0UpVMyvygAvJJEZrvS1wHemLvEJbf5F4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e20fa361-9345-fc3f-6844-b0378e81e98d%40sionneau.net.
Thanks a lot!
Yes I think the documentation can improve a bit to make it more clear that this extension can be done.
I'll have a look at that in the next days.
Cheers
Yann
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3HwZzHKmTZm%2Bgf3%2BGVjFLOL8TQedg9yk__a0jARj37tA%40mail.gmail.com.
Hello Adam,
With a bit of delay, here it is: https://github.com/django/django/pull/12278
thanks for your help!
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3HwZzHKmTZm%2Bgf3%2BGVjFLOL8TQedg9yk__a0jARj37tA%40mail.gmail.com.