JPheonix

Hello,
I am developing an application which needs to change the User Interface language of my WinCE device to the selected one from my application. I need to change the device language , manually it is done from regional settings,but i have to do it programmatically.
Can any one help me out in this ( i need it urgently)
Thanks.



Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

Ilya Tumanov

See this, item 13.






Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

JPheonix

I m sorry for using word urgent.
But apparently i havent got any help as of now .






Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

Ilya Tumanov

Looks like the link was correct then and ¡°Urgent¡± indeed has the opposite effect¡­






Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

Rik78

Only way that I know of is to change the registry and then flush it (maybe not necessary)

After this, it's important to do a warm boot, either programmatically, or prompt the user to warm boot.

Like this:

Try

Dim r As RegistryKey = Registry.LocalMachine.OpenSubKey("nls", True)

r.SetValue("DefaultLCID", 1044)

r.Close()

r = Registry.LocalMachine.OpenSubKey("nls\overrides", True)

r.SetValue("LCID", 1044)

r.Close()

Catch ex As Exception

MsgBox(ex.Message)

End Try

RegFlushKey(HKEY_LOCAL_MACHINE)

Instead of 1044 which is norwegian, change it to whatver value you can see in the registry key when you have chosen the right language manually.






Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

Leonard Lee

Hi,

Thanks for all the help here. Anyway, "urgent" word is not welcome in any forum. People should know that you are awaiting help when you post the question. Trust me, people will reply with sincere help to you without "urgent".

Back to the topic, besides the registry key, it there any other way to set regional settings to other langauge using C# codes

Thanks in advance.




Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

shaper

Hi,

No I don't think that there is any other way to set the Locale on your device. Since in WinCE every system settings is controlled by registry values.

Sven





Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

Sandeep Prabhakar

There are these functions SetUserDefaultLCID (http://msdn2.microsoft.com/en-us/library/ms906279.aspx) and SetLocaleInfo (http://msdn2.microsoft.com/en-us/library/ms906277.aspx), but these affect only the user override portion of the system defaults. To change the system defaults you need to change the system registry (http://msdn2.microsoft.com/en-us/library/ms904189.aspx).

Thanks,

Sandy





Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

JPheonix

Hello ,

As i am a beginner i am not very much aware of the terms System defaults and user override portion.
So could you please elaborate what steps i need to follow to change the language Do i need to set the user override + system defaults


Thanks.
Joe.






Re: .NET Compact Framework Changing WinCE device language programmatically(Urgent)

shaper

Hi,

I experienced when the device cold boots and the new LCID has been set - it's still set to default (American). After a warm boot everything is OK then. This behaviour was recognized on a Symbol MC9090 running CE 5.0.

I don't know if this bug is device independent.

So just do a warm-boot after a cold-boot is my workaround...