[Erp5-report] r23563 - in /erp5/trunk/products/ERP5: Document/ PropertySheet/
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 11 14:14:52 CEST 2008
Author: jp
Date: Thu Sep 11 14:14:39 2008
New Revision: 23563
URL: http://svn.erp5.org?rev=23563&view=rev
Log:
Added a switch in order to be able to use static vs. dynamic language selection in web sites.
Modified:
erp5/trunk/products/ERP5/Document/WebSite.py
erp5/trunk/products/ERP5/PropertySheet/WebSite.py
Modified: erp5/trunk/products/ERP5/Document/WebSite.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/WebSite.py?rev=23563&r1=23562&r2=23563&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/WebSite.py (original)
+++ erp5/trunk/products/ERP5/Document/WebSite.py Thu Sep 11 14:14:39 2008
@@ -115,7 +115,7 @@
# Set default language if any
default_language = container.getDefaultAvailableLanguage()
- if default_language:
+ if default_language and container.isStaticLanguageSelection():
if request.get('AcceptLanguage') is not None:
request['AcceptLanguage'].set(default_language, 80)
@@ -156,7 +156,7 @@
# Static Language Selection support
def _getExtensibleContent(self, request, name):
language_list = self.getAvailableLanguageList()
- if language_list:
+ if language_list and self.isStaticLanguageSelection():
# Interprete names which could be a language
# as a language selection only if language_list
# was defined or set default language
Modified: erp5/trunk/products/ERP5/PropertySheet/WebSite.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/WebSite.py?rev=23563&r1=23562&r2=23563&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/WebSite.py (original)
+++ erp5/trunk/products/ERP5/PropertySheet/WebSite.py Thu Sep 11 14:14:39 2008
@@ -36,5 +36,11 @@
'type' : 'string',
'default' : None,
'mode' : 'rw' },
+ { 'id' : 'static_language_selection',
+ 'description' : 'If set to True, the language selection is based on the URL rather than '
+ 'on cookie. This property impacts the behaviour of Base_doLanguage',
+ 'type' : 'boolean',
+ 'default' : 0,
+ 'mode' : 'rw' },
)
More information about the Erp5-report
mailing list