开发者

Setting up a full copy of a site in one of its own subdirectories

I've been asked to implement the French translation of an ASP.NET 3.5 website. Each translation is going into its own separate website (www.mysite.com, www.mysite.mx, www.mysite.ca, etc). Unfortunately the previous programmer did not implement localization, so each site will have its separate set of files - this is not negotiable.

This French version will also go into its own website (www.mysite.ca), but for the moment I have been asked to put it into a sub-directory of the current site, called /CA (www.mysite.com/ca). I do not want to start messing around with file paths (for navigation and images), because the plan is to move the files in this sub-directory into a separate location in a few weeks. So the only alternative seems to be to move a copy of the site into the sub-directory and set it up as a separate application.

What is the best way to set this up? Since the files in both sites开发者_如何学Python belong to the same namespace and have the same names, how to avoid naming conflicts?


This way you will encounter more headaches in the future. I believe changing the current website, despite of how big it is, is easier than keeping those versions separately.

If you are going to go with your solution, no conflict will happen, since they are different applications, with different AppDomains. If you want to separate them on execution (so problem in one of them doesn't stop others), create separate Application Pools for each of them.


You need to make "Virtual Directories" which act as separate websites. That means that each of the sites can have their own Web.config files.

So what you need to do is right click on the website and add a new virtual directory. The actual location of the files don't have to be where the primary website is. Just point to the folder that contains the translation for that website.

Btw, this really is bad form for a translation of a site. It would probably be better to bite the bullet now and localize the whole website which ASP.NET has really good support for. From experience I know that they are going to come back and ask you to make a change on one of the sites. If you have 10 versions of the site in different languages it means you need to make the change in 10 different places. That is going to become a major pain.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜