我正在使用WIndows 8
和Visual Studio 2012 Metro
。我需要添加一个DropDownList
并让用户选择语言。当用户选择一种特定的语言时,我需要标签中的所有文本值来更改为特定的语言。MultiLanguage - 逻辑错误初学者
I R-CLick project added `APPGlobal_Resource` folder
I R-Clicked and added `APPGlobal_Resource` and created a Resource file called rss.resx
Then i duplicated this file and named it rss.fr.resx
I gave 2 values `String1` and `Hello` and `Bonjour` as values (in both files)
R-Click `dropdownlist` and `edit item`, and `ADD` and then gave `en-US` as `Name` and `value`as `en-US` (same way i gave `en-fr`)
Then i set the Label property, `Data (Expression)` `Bindable property` to `Text` and `Expression Type` to `Resources`.
I gave the `Class Key` to `Res` and `Resource Key` to `String1`.
和我写了下面的代码Default.aspx.cs
protected override void InitializeCulture()
{
base.InitializeCulture();
String cult = Request["DropDownList1"];
if (cult != null)
{
Culture = cult;
UICulture = cult;
}
}
下视显示器的下降与en-US and en-fr
但是当我选择它没有什么变化。我该如何解决这个问题?
我编辑了自己的冠军。请参阅:“[应该在其标题中包含”标签“](http://meta.stackexchange.com/questions/19190/)”,其中的共识是“不,他们不应该”。 –