J
jmjacquel
Hi all,
I have a localization problem in ASP.NET (ASPX) pages using VS.NET 2003.
I have a project called AGCENTRAL, which is part of a solution. The project
simply contains pages, a MyResources.resx file and a MyResources.frr.resx
file. In these two files, I have a simple string named mystr with "Hello
user" in the MyResources.resx file and mystr with "Bonjour Utilisateur" in
the MyResources.fr.resx file.
I try to access these resources using the following code :
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture("fr");
Thread.CurrentThread.CurrentUICulture =
CultureInfo.CreateSpecificCulture("fr");
ResourceManager rm = new ResourceManager("AGCENTRAL.MyResources",
Assembly.GetExecutingAssembly());
thestr=rm.GetString(resid);
When I compile the project, I correctly get the following assemblies :
bin/AGCENTRAL.DLL
bin/fr/AGCENTRAL.resoources.dll
But when the code is running, I always get the default resource value "Hello
user" instead of the correct culture resource value "Bonjour Utilisateur".
I tried to compile the resources files manually using resgen and creating
the satellite assemblies manually too using AL with the same result. I read
many samples or technical notes, doing exactly what was written with always
the same result. I am surely missing something ?!
Any help would be very appreciated !
Best regards,
Jean-Michel JACQUEL
(e-mail address removed)
I have a localization problem in ASP.NET (ASPX) pages using VS.NET 2003.
I have a project called AGCENTRAL, which is part of a solution. The project
simply contains pages, a MyResources.resx file and a MyResources.frr.resx
file. In these two files, I have a simple string named mystr with "Hello
user" in the MyResources.resx file and mystr with "Bonjour Utilisateur" in
the MyResources.fr.resx file.
I try to access these resources using the following code :
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture("fr");
Thread.CurrentThread.CurrentUICulture =
CultureInfo.CreateSpecificCulture("fr");
ResourceManager rm = new ResourceManager("AGCENTRAL.MyResources",
Assembly.GetExecutingAssembly());
thestr=rm.GetString(resid);
When I compile the project, I correctly get the following assemblies :
bin/AGCENTRAL.DLL
bin/fr/AGCENTRAL.resoources.dll
But when the code is running, I always get the default resource value "Hello
user" instead of the correct culture resource value "Bonjour Utilisateur".
I tried to compile the resources files manually using resgen and creating
the satellite assemblies manually too using AL with the same result. I read
many samples or technical notes, doing exactly what was written with always
the same result. I am surely missing something ?!
Any help would be very appreciated !
Best regards,
Jean-Michel JACQUEL
(e-mail address removed)