后面的代码:
ResourceManager rm;
CultureInfo ci;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Session["Flag"] = null;
Session["Language"] = null;
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
rm = new ResourceManager("Resources.Language",
System.Reflection.Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadLanguage(ci);
}
}
private void LoadLanguage(CultureInfo ci)
{
lblHindi.Text = rm.GetString("Hindi", ci);
lblTelugu.Text = rm.GetString("Telugu", ci);
}
我的 App_GlobalResources 文件夹中有以下文件
设计 :
<center>
<a href="Default.aspx"><asp:Label ID="lblHindi" runat="server" Text="Hindi"></asp:Label></a>
<br />
<br />
<a href="Default.aspx"><asp:Label ID="lblTelugu" runat="server" Text="Telugu"></asp:Label></a>
<br />
</center>
但是它不起作用我该怎么做
请帮忙