Ok, I've managed to get the script working Some pages aren't working, but all products of my store seem to be translated.
I still have some questions regarding the translation, namely if it is normal for the created files at /translate/g to not have any extension, they are named after the the url+_html. Is it normal? Will they get indexed by search engines?
One more thing, how can I get an url like example.com/en/index.html instead of example.com/lang/en/index.html ?
Sorry for all the questions and thanks in advance.