0

I need to translate our site. First to one language, but i think later will be more other languages. So I'm thinking about the best way to do this.

So I will use subdirectories to hold the html files. The common files like images, JS etc, will common... I will make language files and include it front of files. I have 25 html files. I will use variables (or constants) in the language file, for everything in the html files like:

  • the text
  • the images alt tag
  • meta key, meta description, so all meta tags..
  • menu..everything

The 25 html files combined size is less than 300k. So the language file will be maximum 100k.

I don't know if I use one big language file and simple include every file (and I don't care if not use every variable in each page), or use 25 separated language file. Is this matter?

Will this language file method, effect the performance, the SEO, or anything else?

halfer
  • 19,824
  • 17
  • 99
  • 186
holian
  • 757
  • 4
  • 13
  • 27

1 Answers1

1

The best bet is to go with some CMS (preferably opensource) solution.

If this is not possible (for any reason we do not get), then this is the right solution (though not the simplest):

  • each language HTML files should be stored separately
  • this all means that in Your root directory You will have folders /en/, /es/, /de/, etc, and the language files will be stored in them for each language
  • language (code) should be present in the URL, like http://mydomain.com/en/index.html for english site version and http://mydomain.com/es/index.html for spanish, etc...
  • use ISO two letter language codes for that purpose
  • whether You will have language files and HTML files that include one language file or only translated HTML files, is upon You then

This is the best solution, IMHO, when speaking of method, SEO, ...

shadyyx
  • 15,825
  • 6
  • 60
  • 95
  • OK. But does it matter if i use 25 separeted language file or one big? (Seo, and html request..etc..) – holian Jan 10 '13 at 19:59