1

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..

3
  • 2
    So if nodejs generates your pages isn't it suitable to generate them already with proper language? Commented Mar 4, 2015 at 19:03
  • nodejs is just serving the data (tables, user_info, etc). The pages are already generated. Commented Mar 4, 2015 at 19:10
  • Without a CMS system this is going to be a LOT of work...I've never seen a site get smaller... Commented Mar 4, 2015 at 19:39

2 Answers 2

1

Easiest way to achieve is using Google Translate

You can see other suggestions at following question on SO:

Best practice multi language website

Following blog also have lot of useful information

Creating A Multilingual Website: A Beginner’s Guide

Hoping this information helps.

Cheers !

Sign up to request clarification or add additional context in comments.

Comments

0

you can use navigator.language to find the language used by user and then accordingly load the required language stored in your js.

2 Comments

better solution than mines! perfct!
This isn't always reliable, especially in Europe. (I worked for a company that hired consultants to scope this out, and they advised against it)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.