Switch browser language

Add-in Express™ Support Service
That's what is more important than anything else

Switch browser language
 
brossi2




Posts: 1
Joined: 2011-10-01
Hi,

I'm new to VB.net development and looking for a way to switch fast and easy between different browser languages (e.g. en-GB to es-ES, etc.), without going through the browser configuration views. I'd like to create a custom toolbar with language dropdown, which should change the respective browser setting. That said, I got concerned if it's even possible to change these settings with VB.net.

Does anyone know if this is possible? Are links I could use for reference?

Thanks,
Mark
Posted 01 Oct, 2011 16:41:28 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Mark,

I am not aware of such possibility. Usually the browser has the same localization as the operating system.
Posted 03 Oct, 2011 04:51:06 Top
pa1 modi




Posts: 84
Joined: 2011-06-18
Is there any C# program which can let me add/change languages preference in IE9 directly?

For example, If I want to add fr-FR (French) or es-MX (Mexico) in my languages preference in IE9, how can I write a C# program to add it and it will show up in IE browser setting?
Posted 03 Oct, 2011 06:08:32 Top
pa1 modi




Posts: 84
Joined: 2011-06-18
hi sergey,

i have done successfully using this

string KEY_NAME = @"Software\Microsoft\Internet Explorer\International";


RegistryKey root = Registry.CurrentUser.OpenSubKey(KEY_NAME, RegistryKeyPermissionCheck.ReadWriteSubTree);

var defaultValue = root.GetValue("AcceptLanguage");
MessageBox.Show("DValue:" + defaultValue);

root.DeleteValue("AcceptLanguage");
root.SetValue("AcceptLanguage","en-IN");
Posted 03 Oct, 2011 08:29:24 Top
Sergey Grischenko


Add-in Express team


Posts: 7228
Joined: 2004-07-05
Hi Pavan,

Did you test the code in IE when Protected mode is turned on? I guess that it doesn't work.
Posted 04 Oct, 2011 05:19:28 Top