-2

I have a multi-language site organised into directories (e.g., pages_EN, pages_FR, etc.), each directory containing webpages such as index.html, contact.html, and referencing common files in separate directories (e.g., "../images/picture.jpg") and external css and js files. This structure has allowed me to copy the code wholesale when adding a new language, only then needing to edit the prose content/text of each.

The problem is now that I'm ready to go live, my web host requires that I have a page called 'index.html' in a directory of theirs (called 'html_public'); this will completely break my page navigation. I can't put all of my language index pages in that directory (because they're all called index.html) and I can't re-name them (e.g., to 'index_EN.html') because of the aforementioned naming requirement.

Must I redesign the whole site? Is this convention common/the rule, or have I just picked the wrong host? If I have just a single (say, English) index page in 'html_public' with all of the others in their respective language directories, then I'm concerned that the content of those other pages might not be indexed. Does anyone have any suggestion about what to do here -- I thought I was structuring this site the right (i.e., simple) way, and now I find that I've got to put twists and turns in to get it online...

If answering, please don't suggest that I just add auto-translation to a single language site -- I'm polylingual, and I've seen how translation software mangles content.

user3492855
  • 37
  • 2
  • 8
  • why would that break your navigation? you would still have your pages_EN directories inside public_html, so whats the actually issue? I assume you have an initial page, before a language is selected or default language. 'public_html' doesnt show in the url. – atmd Feb 12 '15 at 13:13

1 Answers1

0

This is common, the server wants an index.html file. A quick and painless solution for you would be to rename your index_EN.html file to index.html and use it as the home for everyone, from there, you can go to the other languages. A more complex but cleaner solution, would be to create an index.php file and in there read the language of the browser visiting your site and redirect to the correct index file. This should get you started with the php solution Detect Browser Language in PHP

Community
  • 1
  • 1
Jonas Grumann
  • 10,438
  • 2
  • 22
  • 40