开发者

How to add a subdomain to an asp.net website?

I开发者_StackOverflow社区 have an asp.net website. I want to add subdomain for a secondary language:

www.domain.com = main
cn.domain.com = chinese

I have no idea where to start...

Thanks.


First off you might want to read a bit general about how to do mutlilingual applications, here are a couple of resources for you to start off with:

  • Multilingual Applications in .NET
  • Creating Mutlilingual Websites in ASP.NET

In short what you might want to do is in your asp.net application, you listen to what sub-domain the users are coming from and based on that you use the above to change the current language.

Something like these two steps:

  • Identify what subdomain the user is accessing
    • Alternativly check the browser language
  • Change the Globalization settings

Another thing you need to do is move your text into resource files that corresponds with the language the user wants to view. The above tutorials should go through those steps aswell.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜