﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32922	"Adding ""preferred_language"" property to ""HttpRequest"" object"	Ruslan Semagin	nobody	"Sometimes it is useful to get the client's preferred language from the request and then pass it somewhere, for example, apply a filter to fetch data.
Therefore, it is useful to access this property in the object.



{{{
@property
def preferred_language(self):
    """"""Returns the client's language in order of priority from the ""Accept-Language"" header""""""
    languages = [_.strip() for _ in self.headers.get('Accept-Language', '*').split(',')]
    return languages[0].split(';')[0]
}}}

"	New feature	closed	HTTP handling	3.2	Normal	wontfix			Unreviewed	0	0	0	0	0	0
