fix the locale for the generation of urls in templates