def set_language_changer(request, func):
 request._language_changer = func

def set_language_changer ( request , func ) : request . _language_changer = func
sets a language chooser function that accepts one parameter: language the function should return a url in the supplied language normally you would want to give it the get_absolute_url function with an optional language parameter example: def get_absolute_url: reverse(product_view .