I am developing a C++ custom wizard with 1 page UI consisting of a dropdown control. I want to populate this dropdown control with all input languages installed on that machine. (An input language is a culture/keyboard layout pair that determines how the physical keys on a keyboard map or plot to characters in a language.)
I am trying to get this list & have found a way to do in C#.
public void GetLanguages() {
// Gets the list of installed languages.
foreach(InputLanguage lang in InputLanguage.InstalledInputLanguages) {
textBox1.Text += lang.Culture.EnglishName + '\n';
}
}
No i want to implement the same using javascript as my custom wizard uses .js I tried doing below, but getting the js runtime error: "Automation Server can't create object".
<select class="sideBtn" size="1" id="LANGUAGE_LISTBOX" accesskey="L" title="Select Languages:">
<script type="text/javascript">
var obj = new ActiveXObject("System.Windows.Forms");
// Gets the list of installed languages.
for (var lang in obj.Windows.Forms.InputLanguage.InstalledInputLanguages)
{
document.write('<option value="' + lang.Culture.EnglishName + '">' + lang.Culture.EnglishName + '</option>');
}
</script>
</select>
I have tried like this as i have referred other articles which shows trigerring a c# dll using javascript ActiveX object. Triggering C# dll using Javascript ActiveX Object
Can some one help me please??
Regards, Deepthi