> I created one console application and one resx file. Then from this
resx file i generated another resource file with language as german.
then i generated resource file for this using resgen and then created
resource dll using al.exe
when i add this dll to bin folder and get message from this resource
file it is working properly.
But now here my problems start.
I have one windows application with some controls. What i did is i set
localization property of form to true and language as german. After
doing that file with name 'Form1.de.resx' is automatically generated.
But when i try to find out data of this resource file it is not showing
me anything. what i am expecting is it should alleast show me resources
which are there in original file i.e 'Form1.resx'
Can you tell me why this is happening. If i am wrong please correct me.
Please elaborate when you say "it is not showing me anything what (sic) i am
expecting ...". Presumably you mean at runtime (not build time). If you're
following the standard model for using satellite assemblies (probably),
you'll end up with one version of "<YourAppName>.resources.dll" for each
language you're supporting (after compiling your app). You'll find each
version in its own language directory so in your case look for it under a
"de" folder normally found under the "bin" directory off your program's main
(source) folder. This file will contain all embedded German resources for
your app including your "Form1.de.resx" file (stored in the ".dll" as
"<YourDefaultNamespace>.Form1.de.resources"). When you distribute your app,
you simply create a "de" subfolder under the main folder containing your
app's main ".exe" and copy the German version of
"<YourAppName>.resources.dll" to this directory. When the form is loaded, it
will then (normally) appear in German on a German version of Windows but for
any other version you normally have to invoke the following on the thread
that creates the form *prior* to loading the form (otherwise the OS's
default language will be used - note that you have to do this even in your
debug version which may be the problem you're experiencing):
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de");
The form will now load in German.
Hope that helps.