Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Multilingual Site

I am building a multilingual site (English and Dutch).

This is the situation:
I would like to publish to one, though multilingual site.
I have two index files: index.htm and index_dutch.htm.
In both I will have links to CityDesk articles.

If I publish both languages, the index files are published in both English and Dutch directory. However, I would like to have the index files in the 'root', within the index.htm links to only english articles and in index_dutch.htm only links to the dutch articles.

The questions:
- Is there anyone who has experience with building multilingual site?
- using the foreach loop, how would the foreach loop look like in order for CityDesk to distinquish the languages within one publish action, so the index.htm links only to english articles and in index_dutch.htm only links to the dutch articles?
- How can I publish my own index.htm and index_dutch in the root before the directories English and Dutch?

Johan Koerts
Friday, March 15, 2002

I don't know if I'm answering your question directly, but I'll give you a few options.

1) configure your web server to look for default.htm *before* index.htm and put a default.htm in the root that redirects to one of the two sites

2) This is kinda tricky conceptually, but bear with me:

Choose one to be your default and publish it to the root. This is where it really helps that index can now be a template.

In the template "homepage" or "index" or whatever you want to call it, for the english version put the link:

<a href="/dutch/index.htm">click here to view a Dutch version of this site"</a>

Publish the dutch version to a directory /dutch (seperate "Publish To" location).

In the dutch template, put a link:

<a href="/index.htm">click here to view an English version of this site"</a>

The only time this will fail (if my thinking is correct) is if you create a folder called "dutch" in your site, in which case it would constantly over-write the dutch language verison and v.v.

I expect the think tank over at fog creek will come up with a better way of doing this for version 2.x.

Mark W
Friday, March 15, 2002

Actually this stuff got much easier with the latest service pack -- make sure you have it.

Then use a single article for your Index file. It can be translated directly, so you don't need index_dutch.

Set up a publish location that only publishes English in your wwwroot. Set up a second publish location that only publishes Dutch in wwwroot/Dutch. When you want to publish, publish both publish locations.

You will get wwwroot/index.html in english and wwwroot/Dutch/index.html in Dutch.

Joel Spolsky
Friday, March 15, 2002

*  Recent Topics

*  Fog Creek Home