Commit 0b8a9b2c authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added support for static language selection only in web sites

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22330 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d0a3cbf8
......@@ -142,6 +142,18 @@ class WebSite(WebSection):
"""
return self
# Static Language Selection support
def _getExtensibleContent(self, request, name):
language_list = self.getAvailableLanguageList()
if language_list:
# Interprete names which could be a language
# as a language selection only if language_list
# was defined or set default language
if name in language_list:
request['AcceptLanguage'].set(name, 100)
return self.asContext(id=name, title='', short_title='')
return PermanentURLMixIn._getExtensibleContent(self, request, name)
# Virtual Hosting Support
security.declarePrivate( 'manage_beforeDelete' )
def manage_beforeDelete(self, item, container):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment