Okay,
Let’s say you have this URL :
http://www.example.com/site/en/template-group/template/my_url_title
If you want to fetch the current URL and change the second segment then the easiest way to do this would be :
http://www.example.com/{segment_1}/fr/{segment_3}/{segment_4}/{segment_5}
That should hopefully do it for you although I’m still not entirely sure why you need to do this and where exactly or more importantly at what stage. Do you have a link to the site you are doing this on just so that I can get more of an idea of which stage you need to do this at?
Best wishes,
Mark