User-558516119 posted
Hi,
I have 2 web applications. Both applications have the same resource "configuration":
App_GlobalResources folder and within it the following resx files: Global.resx, Global.ar-EG.resx, Global.fr-FR.resx, Global.it-IT.resx
I use the following code to initialize the threads' culture:
var cult = Request.QueryString["cult"] ?? string.Empty;
//some validation for correct culture format happens here...
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo( cult ,true);
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(cult , true);
Culture = UICulture = cult ;
This works in my first application (.NET 3.5) and when i switch between cultures i get different labels for my controls and all that. I used this method for many websites and web applications... nothing new about it.
In my .net 4 application I get ONLY the DEFAULT resx values. I use the exact same code in the exact same places (Page_PreInit) in both applications. Why is it not working?
(it's driving me nuts!)
Thanks,
Eyal