Changes between Initial Version and Version 1 of Ticket #32922
- Timestamp:
- Jul 13, 2021, 8:16:38 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32922 – Description
initial v1 9 9 """Returns the client's language in order of priority from the "Accept-Language" header""" 10 10 languages = [_.strip() for _ in self.headers.get('Accept-Language', '*').split(',')] 11 for language in languages: 12 if language.split(';')[0] == language: 13 return language 14 return language.split(';')[0] 15 return '*' 11 return languages[0].split(';')[0] 16 12 }}} 17 13