Localisation doubt ???? RRS feed

  • Question

  • User784698955 posted

    Hi ..
    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.

    <ASSEMBLY: System.Resources.NeutralResourcesLanguageAttribute(?en?, UltimateResourceFallbackLocation.Satellite)>

    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 ...

    imports system.reflection
    imports system.threading
    imports system.resources

    <ASSEMBLY: System.Resources.NeutralResourcesLanguageAttribute(?en?, UltimateResourceFallbackLocation.Satellite)><Assembly: System.Resources.NeutralResourcesLanguageAttribute("en-us", UltimateResourceFallbackLocation.Satellite)> 
    Partial Class _Default
    Inherits System.Web.UI.Page

    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
    End Try
    End Sub
    End Class

    Wednesday, April 5, 2006 1:56 AM

All replies

  • User-527054664 posted

    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:


    Monday, April 10, 2006 9:35 PM