I've got a website under development and it is in spanish. Now i want to translate it to english. The website is composed of 8 pages. I have added the english flag on top of the website but i was wondering how to do the integration of multiple idioms on my website. I can think of two alternatives:
1.- Clone each page and translate it. After that, inside the root folder create two folders "/es/" and another "/en/". This way, when clicking on the flag i just have to change the url from www.ejemplo.com/es/index.html to www.ejemplo.com/en/index.html. The problem I can see is that if later I translate the site to other idioms i have to generate new folders, more files.... On the other hand, I think this solution can be better for google position as the url is cleaner...
2.- Add a parameter in the url: www.ejemplo.com/index.html?lang=en . I would have all the text in the website in JS and I would load the text in the correct idiom after reading the url parameter.
I don't know which method is better or if there is a better method for dealing with languages...
I must say that I am using HTML5 + CSS3 + JS (and jquery) in the frontend and node.js in the backend...
Any help will be appreciated..