Just add in the string in your concatenation
<?php echo str_replace("//",
"//ca.", get_site_url() .'/fr'. $_SERVER['REQUEST_URI']);
I probably wouldn't do it like this. But that's the quick answer.
There's no need to run str_replace over the whole string.
echo str_replace('//'.'//ca.',get_site_url()).'/fr'/. $_SERVER['REQUEST_URI'];
Also, there are functions for parsing urls