Localization in compact framework 2.0 is a rather poor cousin of its counterpart in the full framwork 2.0. One of the most annoying (but understandable once the reasons are understood ) issue is that CurrentThread.CurrentCulture does not exist on the Compact Framework. Effectively this means that you cannot localize a specific application. You must change the setting at the device level.
To change device level culture setting use the SetUserDefaultLCID Native call to make this change. You can also change the relevant registry entries, and reboot the system, but I usually prefer using an API if available.
What parameter are you going to pass to this function ? Obviously you need a list of supported languages to choose from. In the regular framework, this would have been CultureInfo.GetCultures, but (you guessed it), this is also not supported in Compact Framework. What is supported is a couple of rather unduely (IMHO) contorted functions - EnumUILanguages and EnumUILanguagesProc.
I didn't feel upto doing complex Native calls right after lunch, so i did some hacking (slacking ?), and found that the registry stores the available languages under the Key HKLM\MUI\Available . The name of each of the key contains the LCID for the culture in hex. Its much simpler to enumerate the available languages this way.
The last thing to do once you have allowed the user to change the language is to restart the device (soft-reset). I have left out a few crucial UI issues like prompting the user before resetting the device, and defaulting the combobox to the current Language
Here is the code for the form. Assume that the form has a ComboBox showing the list of available languages and a Menu button to select Ok and Cancel.
using System;
using
namespace
{
InitializeComponent();
ShowCultures();
}
LCIDCultures.Add(languageName, languageLCID);
LanguageComboBox.Items.Add(languageName);
resetDevice();
#region
[
(
);
#endregion
KernelIoControl(IOCTL_HAL_REBOOT,