Last post Jan 25, 2016 07:46 AM by mattekr
Jan 20, 2016 09:54 AM|mattekr|LINK
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?
Jan 21, 2016 07:46 PM|Kulrom|LINK
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?
Jan 25, 2016 07:46 AM|mattekr|LINK
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>