def get(self, language): """Set language for the session based on language code appended to url""" valid_languages = BaseHandler.get_languages(self) if language in valid_languages: BaseHandler.set_language(self, language) self.redirect_to('home')
def get(self): """Change the site language""" new_language = self.request.get('language') BaseHandler.set_language(self, new_language) # redirect user back to their previous page self.redirect(self.request.referer)
def get(self, language): """ Set language for the session based on language code appended to url """ BaseHandler.set_language(self, language) self.redirect_to('home')