Runtime Dictionary Selection

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%option explicit%>

<!--#include virtual="/ASPSpellCheck/ASPSpellInclude.inc"-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" http://www.w3.org/TR/html4/loose.dtd>
<html>
<head>
<title>ASPSpellCheck Sample</title>
</head>
<body>

<textarea name="MyTextArea" cols="50" rows="10" id="MyTextArea"> Hello World.  Ths iz a tezt sampl.  </textarea>
<br>
 
<select name="myLangSelect" id="myLangSelect" >
  <% 
   dim myLink, My_Language_Array, itm
   My_Language_Array=array("Dansk","Deutsch","English (Australia)","English (Canada)","English (International)","English (UK)","English (USA)","Espanol","Francais" ,"Italiano","Nederlands","Portugues","Svenska")  

   set myLink = new AspSpellLink
   myLink.fields="MyTextArea"
   for each itm in My_Language_Array
    myLink.addLanguage(itm)
    response.write "<option value='"&myLink.url()&"'>" & itm &"</option>"&vbnewline
    myLink.clearLanguages
   next
   set myLink=nothing
  %>
 </select>

 <input type="button" value= "SpellCheck" onclick="window.open(document.getElementById('myLangSelect').value,'aspSpellWin','width=460, height=290');return false;">

</body>
</html>

 

Outcome:

runtime dict selection

Run-Time selection of dictionary.

Notes:

There are many variants on this which advanced developers could employ.

It is possible to have scripted or runtime variants of Dictionaries, Dialog Languages and other ASPSpellCheck properties.