code: def locale_negotiator(request):
      
      locale = 'en'
      if request.accept_language:
          locale = request.accept_language.best_match(LANGUAGES)
          locale = LANGUAGES.get(locale, 'en')
      return locale
docs: Locale negotiator base on the `Accept-Language` header