简体   繁体   中英

Any Python modules out there that do anything with HTTP_ACCEPT_LANGAUGE?

I have read that decoding the potentially long string which can be returned from a website for HTTP_ACCEPT_LANGUAGE is not necessarily straightforward. Are there any packages out there in Python that try to do anything with this. I, in particular, am interested in getting at least the list of languages that are acceptable, if not getting them in their proper requested ordering. Ideally, if the full definition (which can be seen at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 ) were implemented that would be the best case in case my requirements change.

some time ago I took this snippet from tweetengine It's worked well for me. Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM