Multilanguage site directory structure and coding

Hi I need to do a multilingual site.

I was thinking of having the following structure:


So the user will get to (in English by default) and be able to navigate either to pages in English or in French.

Now my problem is:

in file I would have to indicate:
<a href="en/corporate.html>
<a href="en/contact.html>
<a href=“fr/index.html”>

but in en/corporate.html> I would indicate:
<a href="corporate.html>
<a href="contact.html> as both files are in the same directory /en/

but how do I jump back to from en/corporate.html ? I can not just write:
<a href="index.html> as both files are not in the same directory.

Do I need to add a en/index.html file or is there a better way to handle this?
Same problem if I want to go back from fr/index.html to the root level

Thanks all for your help.


The safest way is just to use the absolute URL:

<a href="">

or just

<a href="">

ok thx so much!

When I indicate:
<a href=“”> or <a href=“”> in my computer’s version (not online) firefox can not locate the html file.

Will it work once in the server?


Yes, it will work online but not locally. Sorry I didn’t mention that. Also, I probably should have given you this as the absolute URL:

<a href="[COLOR="Red"]http://[/COLOR]">

ok thx, I was wondering :slight_smile:

If you want it to work on your local machine (without using a local server environment like MAMP or WAMP), you could also do this, which will also work online:

<a href="">

The two dots with a slash (../) means “go up one folder and look for index.html”.