Changes between Initial Version and Version 1 of Ticket #32922


Ignore:
Timestamp:
Jul 13, 2021, 8:16:38 AM (3 years ago)
Author:
Ruslan Semagin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32922 – Description

    initial v1  
    99    """Returns the client's language in order of priority from the "Accept-Language" header"""
    1010    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]
    1612}}}
    1713
Back to Top