comparison MoinMoin/i18n/__init__.py @ 941:16f7b6728b4e

move vary: header code to request module and fix it (multiple headers of same type don't work!)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 16 Jul 2006 14:58:21 +0200
parents d2f07ff64b78
children 787e963c9bfd
comparison
equal deleted inserted replaced
940:595a285e634c 941:16f7b6728b4e
282 # is available on this wiki... 282 # is available on this wiki...
283 available = wikiLanguages() 283 available = wikiLanguages()
284 if not request.cfg.language_ignore_browser: 284 if not request.cfg.language_ignore_browser:
285 for lang in browserLanguages(request): 285 for lang in browserLanguages(request):
286 if lang in available: 286 if lang in available:
287 if request.http_accept_language:
288 request.setHttpHeader('Vary: Accept-Language')
289 return lang 287 return lang
290 288
291 # Or return the wiki default language... 289 # Or return the wiki default language...
292 if request.cfg.language_default in available: 290 if request.cfg.language_default in available:
293 lang = request.cfg.language_default 291 lang = request.cfg.language_default