address prefix

How to manage address prefix?
I want to redirect to different subdomain depending on the user
language ex: fr.my_site.com, en.my_site.com