locked
custom culture RRS feed

  • Question

  • User65893105 posted

     Ive created a console app to create and register a custom culture (Welsh, based on en-GB)

    I then have a simple web page to test localisation in 3 different languages (english, german & welsh)

    The webpage has a radiobuttonlist with english, german & welsh radio buttons, the underlying value of each radiobutton

    is

    en-GB

    de

    en-GB-Cy    ---  my custom culture

    Ive created 4 resource files containing some sample text for a few controls on the page

    TestWebsiteResource.resx

    TestWebSiteResource.en-GB.resx

    TestWebsiteResource.en-GB-Cy.resx

    TestWebsiteResource.de.resx

     

    with the custom culture installed and registered, the web page works fine, selecting a radio button switches the text of the controls to the selected language

     

    however, If I unregister the custom culture and run the web page I get this error

    The namespace 'Resources' already contains a definition for 'TestWebsiteResource'

     can anyone tell me why this error is happening ?  what can I do to correct it ?

    Monday, June 1, 2009 6:35 AM

Answers

  • User-1136466523 posted

    Hi,

    From your description, it seems that you met the error message which complains the Resources already contains a definition for 'TestWebsiteResource',right?

    If so, there are several causes out there, make sure that  you do not have two entries in the same resource file with the key of CommonMessages. Also, how many resx files do you have in your App_Global folder? If you have more than one resx file in your App_Global, try renaming the other one.

    Also, you may try the following link:

    http://msdn.microsoft.com/en-us/library/fw69ke6f(VS.80).aspx

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 3, 2009 11:30 PM