locked
Resources in a web site published RRS feed

  • Question

  • User524990015 posted

    Hi, I have a website in VS2010 with App_GlobalResources folder with resx files.
    On my dev machine all works fine, I choose the language and the correct resources they are loaded.

    When i compile the project and publish in the bin folder was created all App_GlobalResources.resources.dll, but the only language that works is English (fallback language).

    How is possible to solve?
    Where I mistake?

    Wednesday, January 20, 2016 9:54 AM

All replies

  • User-18289217 posted

    Do you possibly use any nuget package for the multilingual feature? Please ensure that it's referenced and all is well in the published version. 

    Otherwise please explain how do you switch the languages e.g. from EN to ES .. do you use routing + handlers or as mentioned one of the nuget packages for this purpose?

    Thursday, January 21, 2016 7:46 PM
  • User524990015 posted

    Hi, thanks for the reply. I use standard dot.net resources.

    For switch language I use this code:

            var culture = new CultureInfo("it");
            Thread.CurrentThread.CurrentCulture = culture;
            Thread.CurrentThread.CurrentUICulture = culture;


    I have see that this c# code works fine

    lTitolo.Text = Resources.LocalizedText.Chi_Siamo_Titolo;


    and this asp code works only in local

    <p><asp:Literal ID="lTesto" runat="server" Text="<%$Resources:LocalizedText,Chi_Siamo_Testo %>"></asp:Literal></p>



    Monday, January 25, 2016 7:46 AM