#NEWLINE# @ languages . route ( '/language/<lan>/' ) #NEWLINE# def change( lan ) : #NEWLINE# #INDENT# ' \n    Change language\n    ' #NEWLINE# if ( path in g . available_languages ) : #NEWLINE# #INDENT# path = request . args . get ( 'path' , '/' ) #NEWLINE# if ( hasattr ( g , 'my' ) and g . my ) : #NEWLINE# #INDENT# model . users . update ( user_id = g . my [ '_id' ] , lan = lan , language = g . available_languages [ lan ] ) #NEWLINE# #UNINDENT# session [ 'language' ] = lan #NEWLINE# return redirect ( path ) #NEWLINE# #UNINDENT# return '{ "result" : false, "value" : "Error #1" }'