- Timestamp:
- 13 Nov 2014, 14:40:27 (10 years ago)
- Location:
- main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-regista/src/waeup/ikoba/language.py
r7832 r11949 23 23 from zope.session.interfaces import ISession 24 24 from zope.i18n.interfaces import IUserPreferredLanguages 25 from waeup. kofa.configuration import ConfigurationContainer26 from waeup. kofa.interfaces import IKofaUtils25 from waeup.ikoba.configuration import ConfigurationContainer 26 from waeup.ikoba.interfaces import IIkobaUtils 27 27 28 class KofaLanguage(grokcore.component.Adapter):28 class IkobaLanguage(grokcore.component.Adapter): 29 29 """Set preferred languages""" 30 30 grokcore.component.context(IBrowserRequest) … … 36 36 37 37 # Extract the preferred language from a cookie: 38 lang = request.cookies.get(' kofa.language', None)38 lang = request.cookies.get('ikoba.language', None) 39 39 if lang is None: 40 lang = getUtility(I KofaUtils).PORTAL_LANGUAGE41 request.response.setCookie(' kofa.language', lang, path='/')40 lang = getUtility(IIkobaUtils).PORTAL_LANGUAGE 41 request.response.setCookie('ikoba.language', lang, path='/') 42 42 43 43 # According to IUserPreferredLanguages, we must return a list.
Note: See TracChangeset for help on using the changeset viewer.