Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm using a resource file (.resx) to manage multilingual displays of my pages. I get this message when I try to use my resource file, I thing that I have to compile my resource file to an assembly or something like that and I don't know how to proceed. I have 2 resource file : strings.us.resx (for US language) and strings.fr.resx for (French language). Can someone help me ?

 

 

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 "Auditeurs User". baseName: strings locationInfo: <null> resource file name: strings.resources assembly: Auditeurs User, Version=1.0.1627.17748, Culture=neutral, PublicKeyToken=null

Scalf.

Do not want others to know what you have done? Better not have done it anyways.

  • Administrators
Posted (edited)

You would need to convert the .resx file to a valid .resources file using resgen.exe

resgen.exe /compile strings.en-US.resx

and then convert this into a dll using al.exe

al.exe /out:en-US\App.resources.dll /culture:en-US /embedresource:strings.en-US.resources

 

This will put the resultant DLL in a sub folder named after the culture (en-US in this case) which is the location the resource manager expects to find them.

You would do the same with the French etc. resources - just change the en-US to correctly reflect the culture.

Edited by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Many thanks !!!!

That's fine, it works correctly !!!

 

 

 

You would need to convert the .resx file to a valid .resources file using resgen.exe

resgen.exe /compile strings.en-US.resx

and then convert this into a dll using al.exe

al.exe /out:en-US\App.resources.dll /culture:en-US /embedresource:strings.en-US.resources

 

This will put the resultand DLL in a sub folder named after the culture (en-US in this case) which is the location the resource manager expects to find them.

You would do the same with the French etc. resources - just change the en-US to correctly reflect the culture.

Scalf.

Do not want others to know what you have done? Better not have done it anyways.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...