|
I tried linking satellite assembly using the first way, but it doesn't work . The second way is pretty straight forward and it works fine. I am using VS2005. I am able to make the dll using Al.exe. Is this approach working for anyone else??
Cheers!!
|
|
|
|
|
Hi. I follow the B solution steps, but I put the resource files on another project inside the same solution. The system works fine, but I got the following error when I compile the resources project:
C:\Projetos\vs2k5\MDI\Idiomas\MDI.Designer.cs(38,25): error CS0234: The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
C:\Projetos\vs2k5\MDI\Idiomas\MDI.Designer.cs(53,25): error CS0234: The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
C:\Projetos\vs2k5\MDI\Idiomas\MDI.Designer.cs(22,21): error CS0234: The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?)
Thats the code:
<br />
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]<br />
<br />
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]<br />
<br />
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]<br />
Using VC2005
Thanks
Valmir Cinquini
Notepad MVP
|
|
|
|
|
I kept getting AL1047 linker errors until I changed the linkder line to:
Al.exe /t:lib /embed:MyResource.en-GB.resources /culture:en-GB /out:MyApplication.resources.dll
|
|
|
|
|
Hello,
I've created a satellite assembly using approach A but it's not working.
I have no error but the strings that are to be read from the resource are coming up empty.
I don't know what I am doing wrong.
|
|
|
|
|
Hello Prakash,
I have tried both the options you have mentioned here in article. Second works fine but is not recommended by Microsoft.
The error I get while using Satellite assembly:
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resource.resources" was correctly embedded or linked into assembly "App_Web_prvhcn9b" at compile time, or that all the satellite assemblies required are loadable and fully signed."
I am very frustated now and not able to proceed in my work as I have already spent my 1 week now on solving this issue. Please help in this matter urgently.
Regards,
Ruchi Shivnani
modified on Wednesday, April 9, 2008 2:57 AM
|
|
|
|
|
Hello,
Can anyone help on this issue.
Ruchi
|
|
|
|
|
I'v got the same issue. Can anybody help?
|
|
|
|
|
A have the same problem and the same exception. In my case it is nesessary to set the correct name of the resource file.The name should be <appname>.<file_of_resources_name> when you create the ResourceManager.
|
|
|
|
|
Friends i am also having the same problem can anyone help me.
- Lenin
|
|
|
|
|
Using resource files we can maintain different versions of languages/strings.
how to convert the data grid data(reading from database) which is entered in english and show it to the end user in different cultures, if i have a dropdown of culture names.
|
|
|
|
|
I've been using StringDB .net for a while, and it has a handy Translate() function. By using this you can translate your default strings to the languages in your language pack. You can get it from www.swbox.com
|
|
|
|
|
Hi all
I developed website in asp.net using c# in English and Arabic languages using localization and resource file, application run good in both language. But the problem that appearance of controls like textboxs or labels become bad after changing language I don't know why.waiting ur help.
|
|
|
|
|
Hi,
A very good article.
I have tried both options. The second one is working fine. However in case of the first one it is always returning the values from the default resx (MyResource.resx) file, even though I have created a satellite assembly for en-GB. Please help...
Regards,
Prashanth
|
|
|
|
|
Same problem here, only second version works. I use VS2008, and put the MyApplication.resources.dll file in Debug/en-GB/ subfolder. What's going wrong?
|
|
|
|
|
Hi,
I am hoping someone can help me...
I have a combo box dropdown style on a form that I want to localise.
I am trying to find the code to load the resource file.
For instance the code for a label called Component List is:
this.label1.Text = res.GetString("Component List");
How do I do this for a combo box with a collection:
blue
red
yellow
Any help is greatly appreciated.
Thanks in advance
|
|
|
|
|
This is more of a combo box question than a resource question.
One way to handle it would to have a single resource string, delimited by some character such as semicolon. In this case, your resource string would be "blue;red;yellow"
When loading your form, you'd init the combo box, with something like
string[] colors = res.GetString("ColorList").Split(new char[] { ';' });
foreach (string color in colors)
yourCombo.Items.Add(color);
They key takeaway here, I would think, would be to encode your list as a single string entry.
|
|
|
|
|
Hi! In the /embed option of the al.exe utility no spaces are allowed between the first and the second path. Otherwise, the AL utility will throw an error.
|
|
|
|
|
hi,
there's also another issue involving a space non needed:
in the constructor of the ResourceManager
new ResourceManager("MyApplication.MyResource "<--- this space prevent the correct loading of the resource
|
|
|
|
|
Hi,
I was just wondering what the default culture is for the resource file?
Is it always en-us unless you change this somewhere?
Thanks,
gav
|
|
|
|
|
It's called the fallback resource. They do not have a culture / language associated with them.
You have
* Culture specific en-US (language, culture)
* Culture invariant en (language only)
* Default / fallback resource (the ones that get compiled with the application).
Let's say you've en-US as your default (OS dfault).
Your application [read CLR] will try to locate resources in the order above mentioned.
|
|
|
|
|
I've been looking at this too. I've tried just creating a MFC .exe with just English (U.K.) resources and it LoadString fails.
|
|
|
|
|
I followed the instructions and created a file called MyApplication.MyResource.resx
I did a resgen and created the dll
\MyApplication>Al.exe /t:lib /embed:MyResource.en-US.Resources,MyApplication.MyResource.en-US.resources /culture:en-US /o
ut:MyApplication.resources.dll
The program was not able to find the resource string and when I looked into the file with ildasm I found that the .dll was empty.. What am I doing wrong?
Howard Davis
h_n_davis@hotmail.com
|
|
|
|
|
Hi, I'm having problems with the resource file.
I built the resource file with the resourceId and the value,but I dont know if it's correct, because if I put the resouceID of the form the labels assume that value when their resouceId = null but if not, their values are not read. I want to know exactly how to fill the resource file.
Thank you.
kitrin
|
|
|
|
|
i have a visual studio project and binary version of the resource file (myresource.en-GB.resources) in c:\res\res directory.
i'm using this command to generate the satellite assembly:
al.exe /t:lib /embed:res.myresource.en-gb.resources, myresource.en-gb.resources /culture:en-gb /out:resources.dll
and i get this error:
ALINK: error AL1047: Error importing file 'c:\res\res\myresource.en-gb.resources, - 0x8013110e
whats wrong?? please help
|
|
|
|
|
Look at Point 2b) in this article: If it is a C# project the naming has to be
< MyApplication(Namespace) >.< Name of MyResource >.< culture >.resources and the out also explicitly needs to be < MyApplication (Namespace) >.resources.dll otherwise you have no name for the file as resources is a keyword only.
-- modified at 19:15 Wednesday 25th April, 2007
JonnyPoet
|
|
|
|