#NEWLINE# def change( lang = None , my_id = None ) : #NEWLINE# #INDENT# '\n    ' #NEWLINE# if ( not ( lang in g . available_languages ) ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'result' : False , #NEWLINE# 'value' : 'Error #1' , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if my_id : #NEWLINE# #INDENT# bombolone . model . users . update ( item_id = my_id , lan = lang , language = g . available_languages [ lang ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# session [ 'language' ] = lang #NEWLINE# #UNINDENT# data = { #NEWLINE# #INDENT# 'result' : True , #NEWLINE# 'value' : '' , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return data