Last post Apr 10, 2006 09:35 PM by andersonimes
Apr 05, 2006 01:56 AM|mailmechandru|LINK
I have a small requirement .. its as follows. We have a webpage which displays a Value depending upon the language the user sets on the page.
If the user selects a language which is not supported by the webpage it should display the value of the default language.
We have used resource files for each languages ... and for default language
fallback used the following attribute.
en.resx is the file name for resource file 1
en-us.resx is the file name for resource file 2
But we are stuck with an error ... which is as follows
"The satellite assembly named "App_Web_dezxbda7.resources.dll, PublicKeyToken=" for fallback culture "en" either could not be found or could not be loaded. This is generally a setup problem. Please consider reinstalling or repairing the application"
or sometimes this error ...
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyResource.resources" was correctly embedded or linked into assembly "App_Web_7v0px3zw" at compile time, or that all the satellite assemblies required are
loadable and fully signed."
Kindly suggest some ways to solve this ...
The code is as follows ...
<Assembly: System.Resources.NeutralResourcesLanguageAttribute("en-us", UltimateResourceFallbackLocation.Satellite)>
Partial Class _Default
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim NewRM As System.Resources.ResourceManager
NewRM = New ResourceManager("en", GetExecutingAssembly())
Catch ex As Exception
Apr 10, 2006 09:35 PM|andersonimes|LINK
the name of the resource file is very important. It has 3 parts, seperated by periods (".").
1) Name of File
2) Culture Code (ex "en-US") (not included in the default language file)
3) extension (resx)
It looks like you skipped part number 1. You shouldn't name your files simply "en.resx". A proper name would be "MyStrings.en.resx". You would name your "default" language without part 2, such as "MyStrings.resx".
This is probably the issue. Here's some documentation to get you started: