更新时间:2021-09-10 22:14:58
设置的UICulture
和文化
的页面指令为我工作:
Setting the UICulture
and Culture
on the page directive worked for me:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" UICulture="auto" Culture="auto" %>
然后我把我的铬语言法国
,并确保重新排序的语言 - 镶边将采取最上面的语言为默认浏览器
I then set my chrome language to French
and made sure to re-order the languages - chrome will take the topmost language as default for the browser.
然后我用:
Response.Write(System.Threading.Thread.CurrentThread.CurrentUICulture);
这正确地给了我 FR
您可以设置页面级别的文化还是全球范围内,看到这里。
You can set the culture on the page level or globally, see here.