comparison MoinMoin/i18n/__init__.py @ 15:5a2a8201bb6f

make moin friendlier to proxies, thanks to ASF imported from: moin--main--1.5--patch-16
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 23 Sep 2005 20:02:07 +0000
parents 77665d8e2254
children f1e33f7ad2e6
comparison
equal deleted inserted replaced
14:c8a7e012ebeb 15:5a2a8201bb6f
197 # Or try to return one of the user browser accepted languages, if it 197 # Or try to return one of the user browser accepted languages, if it
198 # is available on this wiki... 198 # is available on this wiki...
199 available = wikiLanguages() 199 available = wikiLanguages()
200 for lang in browserLanguages(request): 200 for lang in browserLanguages(request):
201 if available.has_key(lang): 201 if available.has_key(lang):
202 if request.http_accept_language:
203 request.setHttpHeader('Vary: Accept-Language')
202 return lang 204 return lang
203 205
204 # Or return the wiki default language... 206 # Or return the wiki default language...
205 if available.has_key(request.cfg.default_lang): 207 if available.has_key(request.cfg.default_lang):
206 lang = request.cfg.default_lang 208 lang = request.cfg.default_lang