Asp.net multilingual web application - localizatio

2019-02-20 03:19发布

What's your opinion for the best possible way to build asp.net multilingual localized web application (only UI localization of string resources). Especially this two things:

  1. How to store resources? Xml files, resx files or something else?
  2. How to handle URL's? I don't want to keep language parameter in query string all the time so I need to use URL rewriting maybe?

/BR

2条回答
在下西门庆
2楼-- · 2019-02-20 04:05

Use Data Driven ASP.NET Localization Resource Provider as described in http://www.west-wind.com/presentations/wwdbresourceprovider/

查看更多
我只想做你的唯一
3楼-- · 2019-02-20 04:17

Have you looked into the localization support in ASP.NET? It uses resource assemblies and sets the default resource based on the browser's settings. You can also override the setting by setting the culture and uiculture settings for the thread handling the request.

If you don't like using the resource assemblies (which do require a project rebuild when you want to make changes), you can also create a custom resource provider for ASP.NET (this link uses MS Access as an example, you can try to customize it for SQL or some other provider).

http://asp.net has some tutorials to get you started, like this one.

查看更多
登录 后发表回答