Localizable Resources and Satellite Assembly dll

D

Derick Smith

Hi!
I am just starting to use .NET and need some help!

If I create my own DLL for String resouces using this command:
C:\WINNT\MICROS~1.NET\Framework\v1.1.4322\Al /t:lib
/embed:resourceString.fr-ca.resources, /culture:fr-ca
/out:Example2.resources.dll

C:\WINNT\MICROS~1.NET\Framework\v1.1.4322\Al /t:lib
/embed:resourceString.resources, /out:Example2.resources.dll

I then have to copy these two files (that have the same name) to the
correct directory locations. Where do I put the default DLL
(Example2.resources.dll using resourceString.resources)? (If I put the
fr-ca dll in the fr-ca directory)?

Another problem:
I am using the .Language and the .Localizabe property of the form and
setting the language to "fr". This in return creates
Debug\Form1.fr.resources along with Debug\Form1.resouces. When I
compile it, it creates the Example1.Resources.dll and puts them in the
appropriate directory. I am also assuming this dll contains all
resources for all forms in the solution. So.....

How can I create my own Example1.Resources.dll for Strings and have
Example1.Resources.dll from Form1 as well??? This is kind of
confusing!

So far I have only been able to use the .recouces file (using
ResourceManager.CreateFileBasedResourceManager). I can use the
Localizable property, but I cannot access strings from my satellite
assembly dll created from my resouces file.

Any help is greatly appreciated!
Thanks
Eric
 
G

Guest

Derick,

For the first question, you need to create the culture specific satelite dll
with the culture name embedded in it.

Instead of:

Al /t:lib /embed:resourceString.fr-ca.resources /culture:fr-ca
/out:Example2.resources.dll

Use:

Al /t:lib /embed:resourceString.fr-ca.resources,
resourceString.fr-ca.resources /c:fr-ca /out:Example2.fr-ca.resources.dll

You create the default or invariant satelite dll like this:

Al /t:lib /embed:resourceString.resources, resourceString.resources
/out:Example2.resources.dll

Place the dlls in the following folders:

bin/Example2.resources.dll

bin/fr-ca/Example2.resources.dll

Review the following:
ASP.NET Quickstarts - Localization

http://msdn.microsoft.com/library/d...Localization_using_the__NET_Framework_SDK.asp

Google for "localization"


Now the second question is easy, you need to use the Assembly.LoadFrom()
method to explicitly load another satelite assembly that contains your
strings.

HTH
Jorge
 

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

Top