#11915: language range request should return sublanguage --------------------------------------+------------------------------------ Reporter: galund | Owner: nobody Type: Bug | Status: new Component: Internationalization | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------
Comment (by aerkalov): Just a small comment from my side, not sure at this moment how to solve this. As it is implemented at the moment function all_locale_paths (django/utils/translation/trans_real.py) always returns "django/conf/locale" (with addition of user added locale path directories). That directory already contains translation files for most of the languages with sublanguages (ar, pt, es, en, ...). In example above where user has defined "Accept-Language: pt" Django will accept this as valid choice (because it does have translation for that language) even though user has only defined "pt_BR" for his own applications. Not really sure how one could decide and make a switch to pt_BR language code. -- Ticket URL: <https://code.djangoproject.com/ticket/11915#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.