、、を使用しWIndows 8
てVisual Studio 2012 Metro
います。を追加しDropDownList
て、ユーザーに言語を選択させる必要があります。ユーザーが特定の言語を選択すると、ラベル内のすべてのテキスト値をその特定の言語に変更する必要があります。
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
が、選択しても何も変わりません。どうすればこれを解決できますか?