Localization using resources file not working?

The problem in . NET localization if you use multithreading is that you need to set culture manualy for every thread that you spawn (in case it is different than windows culture, in case when user can choose desired language). It is not inherited from the main thread After you create new thread and before you start it you should set it's Culture to the Culture of main thread (which normaly uses the default culture of the windows) So, system shows good CurrentCulture.

But what does current thread says? Maybe application is started with different culture for some reason so that's why it loads default resources file? Anyway, there is no reason why you shouldn't manualy set current culture.

Mostly you need to do that when you want to give user the option to change application's language.

The problem in . NET localization if you use multithreading is that you need to set culture manualy for every thread that you spawn (in case it is different than windows culture, in case when user can choose desired language). It is not inherited from the main thread.

After you create new thread and before you start it you should set it's Culture to the Culture of main thread (which normaly uses the default culture of the windows). So, system shows good CurrentCulture. But what does current thread says?

Maybe application is started with different culture for some reason so that's why it loads default resources file? Anyway, there is no reason why you shouldn't manualy set current culture. Mostly you need to do that when you want to give user the option to change application's language.

System.Globalization.CultureInfo. CurrentUICulture.ToString() and Thread.CurrentThread. CurrentUICulture.ToString() returns same output: en-US, but System.Globalization.CultureInfo.CurrentCulture.ToString() returns hr-HR (== Windows -> Control Panel -> Region and language format property).

So I must set CurrentThread. CurrentUICulture, because there isn't setter for System.Globalization.CultureInfo. CurrentUICulture?

– davor Oct 15 at 16:12 Yes, you must set CurrentThread. CurrentUICulture and CurrentThread. CurrentCulture to what you want.

You are getting wrong System.Globalization. CultureInfo, english one, that is why your app is using default resource file. Like MSDN says for Thread.

CurrentUICulture - "Gets or sets the current culture used by the Resource Manager to look up culture-specific resources at run time. ". – Goran Genter Oct 15 at 16:39.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions