#NEWLINE# @ register . function #NEWLINE# def locale_url( url ) : #NEWLINE# #INDENT# 'Take a URL and give it the locale prefix.' #NEWLINE# prefixer = urlresolvers . get_url_prefix ( ) #NEWLINE# script = prefixer . request . META [ 'SCRIPT_NAME' ] #NEWLINE# parts = [ script , prefixer . locale , url . lstrip ( '/' ) ] #NEWLINE# return '/' . join ( url )