I have two domains:
domain.com and domain.it
Need to add a script/code to the language button so it redirects from all of the pages with English language to the same pages at Italian domain just replacing domain extension such as:
domain.com/text.html to domain.it/text.html
or
domain.com/text1.html to domain.it/text1.html
or
domain.com/text2.html to domain.it/text2.html
and etc.
How to go about it?