Hi Brett,
As for the ASP.NET 2.0 localization and resource handling, it hasn't change
much from the original one. For the resource file, e.g .resx or .txt file,
their file name should not contain any cultureInfo name(such as "en",
"fr-Fr", this is used for the runtime to idenitity them as the same
resource for a specific language/culture.
For example, if we have the following resource files:
MyResources.strings.resx
MyResources.strings.en.resx
MyResources.strings.fr.resx
They're actually a single resource item, just of different
culture/language. At runtime in the code, we just use the following
statement to retrieve value from the above resource file:
Response.Write(Resources.MyResources.strings.XXXXX )
(no prefix like "en" or "fr" or....)
and which file to use depend on the current thread's UICulture.
For example, if we add the following code to manually set the thread's
CurrentUICulture:
============
protected void Page_Load(object sender, EventArgs e)
{
System.Threading.Thread.CurrentThread.CurrentUICul ture = new
System.Globalization.CultureInfo("fr-FR");
Response.Write(Resources.MyResources.strings.XXXXX )
============
the above code will read the resource string from the
MyResource.strings.fr.resx file.
You can also get some further description in the MSDN document on ASP.NET
global/localization:
#ASP.NET Globalization and Localization
http://msdn2.microsoft.com/en-us/library/c6zyy3s9.aspx
#Walkthrough: Using Resources for Localization with ASP.NET
http://msdn2.microsoft.com/en-us/library/fw69ke6f.aspx
Hope all these help you.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.