By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

Localizable Resources and Satellite Assembly dll

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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/de...mework_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

"Derick Smith" wrote:
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

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.