In pylons project when I do request.accept_language.best_matches(), it is returning me Null. I have set 2 languages in browser (en-us and es-ar) by going to Preferences-Content- Languages in firefox.
How can I get the languages specified in the browser?
repr(request.accept_language) gives <NilAccept: <class 'webob.acceptparse.Accept'>>
Try looking at request.headers['accept-language'], or indeed the entire request.headers object. I suspect your browser is not providing those headers.
Also, take a look at the browser request in wireshark, and the client request on the server.
request.accept_language is always null in python