Internationalization Problem

  • Thread starter Pablo Jose Almeida da Guia
  • Start date
P

Pablo Jose Almeida da Guia

Well..
...I am using some resource files to make the internationalization of a
ASP.NET application.
I created a project and three resource files.

------- resource files -------
/strings.txt
/en-US/strings.en-US.txt
/pt-BR/strings.pt-BR.txt
------- resource files -------

When I compile, is generated:

------- compiled -------
/bin/LicenseManager.dll
/bin/en-US/LicenseManager.resources.dll
/bin/pt-BR/LicenseManager.resources.dll
------- compiled -------

The source to use these resources is:

------------------- source -------------------
Thread.CurrentThread.CurrentCulture
= CultureInfo.CreateSpecificCulture("en-US");
Thread.CurrentThread.CurrentUICulture
= Thread.CurrentThread.CurrentCulture;
ResourceManager rm = new ResourceManager("strings",
Assembly.GetExecutingAssembly());
Response.Write(rm.GetString("xxx",
CultureInfo.CreateSpecificCulture("en-US")));
------------------- source -------------------

But when I run the application:

------------------- error message -------------------
Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure "strings.resources" was
correctly embedded or linked into assembly "LicenseManager". baseName:
strings locationInfo: <null> resource file name: strings.resources assembly:
LicenseManager, Version=1.0.1433.26887, Culture=neutral, PublicKeyToken=null
------------------- error message -------------------


I think that the neutral culture not was linked with the application, then
the
error occurs.
I created a simple application, console application, that generate the same
error.
But, if I compile (the console application) manually works.

------------------- manually compilation -------------------
resgen strings.txt
resgen strings.en-NZ.txt
resgen strings.de.txt

csc /t:exe /res:strings.resources /out:myApp.exe
al /t:lib /culture:en-NZ /embed:strings.en-NZ.resources
/out:myApp.resources.dll
al /t:lib /culture:en-de /embed:strings.de.resources
/out:myApp.resources.dll
------------------- manually compilation -------------------


My ask is:
How I resolv this?
How I config the Visual Studio to compile the string.txt with the
application, and link the Satellite Assemblies?
How I compile a ASP.NET application manually, to use /res:strings.resources,
equal the console application?

observation: All resources are configurated as "Embedded Resource".


Please... Help-me!
Tanks..
[]'s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top