1

I want to test a Qt application for various languages. So I change the system language b modifying the MUI Language registry tag (HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/MUI/UILanguages) to fr-Fr or de-DE for french and german respectively. Then I need to restart the system for the AUT ( application under test ) to start displaying the new language. Is there any other way I can do this without having to restart the system? I've tried killing explorer.exe and launching it again but the language changes don't reflect on my application unless I restart. I want to avoid restarting. Is there a service I need to stop/restart?

Also, is there any other possible way for me change the system language and get to reflect in my application (without changing the registry)?

Machavity
  • 30,841
  • 27
  • 92
  • 100
user3020320
  • 61
  • 1
  • 8

1 Answers1

0

No, I think its not possible without restart or log off system because system check for language when start after that it will not checking for many registry keys.

Try this may be help you

Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture=Thread.CurrentThread.CurrentCulture;

and if you want change only input language not for system then try

private void ChangeKeboardLayout(System.Globalization.CultureInfo CultureInfo)
{
    InputLanguage c = InputLanguage.FromCulture(CultureInfo);
    InputLanguage.CurrentInputLanguage = c;
}
Mehul Patel
  • 1,084
  • 2
  • 12
  • 28
  • I tried this. But when I launch my application it still launches in English. – user3020320 Apr 24 '14 at 08:58
  • May be forgot to set current ui culture Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE"); Thread.CurrentThread.CurrentUICulture=Thread.CurrentThread.CurrentCulture; – Mehul Patel Apr 24 '14 at 09:07
  • It still doesn't work though. Is there an alternative? Like say I change the registry and then restart a service? – user3020320 Apr 24 '14 at 09:18