def __before__(self): if 'lang' in session: set_lang(session['lang']) else: set_lang('fa') session['lang']='fa' session.save() h.setMenuItems(_('menus.dat')) self.menu_items = session[_('menus.dat')] h.setPageContents(_('pages.dat'))
def __before__(self): #if 'lang' in session: #set_lang(session['lang']) #else: #set_lang('fa') #session['lang']='fa' #session.save() set_lang(request.environ['app.lang']) h.setMenuItems(_('menus.dat')) h.setPageContents(_('pages.dat')) self.menu_items = session[_('menus.dat')]
def __before__(self): set_lang(request.environ["app.lang"]) h.setPageContents(_("pages.dat"))
def __before__(self): set_lang(request.environ['app.lang']) h.setPageContents(_('pages.dat'))
def __before__(self): set_lang(request.environ['app.lang']) h.setMenuItems(_('menus.dat')) h.setPageContents(_('pages.dat')) self.menu_items = session[_('menus.dat')]