Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to change the language of a WPF project. i am using method mentioned in

http://www.wpfsharp.com/2012/01/27/how-to-change-language-at-run-time-in-wpf-with-loadable-resource-dictionaries-and-dynamicresource-binding/[^]


But the default culture info is not getting loaded at the starting..
How to show the Default language at the starting?
Posted

1 solution

You need to change language, not default language. The default language means system default, but you are talking about start of your application.

Look at the article you referenced and pay attention for these lines:
C#
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;


That should reload resource assemblies with the satellites closest to the required culture.

Maybe you want to switch input language (related to keyboard layout)? This is something different. Please see:
http://msdn.microsoft.com/en-us/library/system.windows.input.inputlanguagemanager.aspx[^].

(If you want to change the system default input language look at the SystemParametersInfo function with the SPI_SETDEFAULTINPUTLANG flag:
http://msdn.microsoft.com/en-us/library/ms724947%28VS.85%29.aspx[^].

This is not a part of .NET CFL. You need to use P/Invoke to do it:
http://en.wikipedia.org/wiki/Platform_Invocation_Services[^],
http://msdn.microsoft.com/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp[^].

I doubt you really need it.)
—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900