MultiLanguage web site
-
Hi all, I have view of some example (globalization) to develop a multilingua web site. But still cant success on it.i have create a .resx file call rsc.zh-CHS.resx in floder App_GlobalResources. Then using the the code following to display selected language. And also use a dropdownlist to select a preferral language
private ResourceManager rm;
protected void Page_Load(object sender, EventArgs e)
{
CultureInfo ci;
if (!IsPostBack)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
rm = new ResourceManager("rsc", Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadData(ci);
}
else
{
rm = new ResourceManager("rsc",Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadData(ci);
}
}public void LoadData(CultureInfo ci)
{
lblCNName.Text = rm.GetString("lblCNName", ci);
lblENName.Text = rm.GetString("lblENName", ci);
}I get a error in
**LoadData()**
and said that:Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "rsc.resources" was correctly embedded or linked into assembly "App_GlobalResources.qb8c2ydr" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Note: my example come from http://ashrafur.wordpress.com/2008/01/17/multi-language-supported-web-site-in-aspnet/[^] any tips are welcome. regards cocoonwls
-
Hi all, I have view of some example (globalization) to develop a multilingua web site. But still cant success on it.i have create a .resx file call rsc.zh-CHS.resx in floder App_GlobalResources. Then using the the code following to display selected language. And also use a dropdownlist to select a preferral language
private ResourceManager rm;
protected void Page_Load(object sender, EventArgs e)
{
CultureInfo ci;
if (!IsPostBack)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
rm = new ResourceManager("rsc", Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadData(ci);
}
else
{
rm = new ResourceManager("rsc",Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadData(ci);
}
}public void LoadData(CultureInfo ci)
{
lblCNName.Text = rm.GetString("lblCNName", ci);
lblENName.Text = rm.GetString("lblENName", ci);
}I get a error in
**LoadData()**
and said that:Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "rsc.resources" was correctly embedded or linked into assembly "App_GlobalResources.qb8c2ydr" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Note: my example come from http://ashrafur.wordpress.com/2008/01/17/multi-language-supported-web-site-in-aspnet/[^] any tips are welcome. regards cocoonwls
Did you added there a default resource file ?
Parwej Ahamad
-
Did you added there a default resource file ?
Parwej Ahamad