Multi-lingual web application - how do I detect the user's language in ASP.NET?

后端 未结 6 808
说谎
说谎 2020-12-15 05:20

I\'m building an ASP.NET web application, and all of my strings are stored in a resource file. I\'d like to add a second language to my application, and ideally, I\'d like t

6条回答
  •  眼角桃花
    2020-12-15 06:04

    The client generally sets Accept-Language in the HTTP request header with a quantitatively scored list of preferred language, conventionally (but not necessarily) in order of most favored to least favored. You can parse that, but as Maxam has noted, ASP.NET does have a mechanism for doing that on your behalf.

提交回复
热议问题