Leadtools.Document Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
SelectedLanguages Method
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : SelectedLanguages Method




Gets the current selected languages.

Syntax

Visual Basic (Declaration) 
Public Function SelectedLanguages() As RasterDocumentLanguage()
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim value() As RasterDocumentLanguage
 
value = instance.SelectedLanguages()
C# 
public RasterDocumentLanguage[] SelectedLanguages()
Managed Extensions for C++ 
public: RasterDocumentLanguage[] SelectedLanguages(); 
C++/CLI 
public:
array<RasterDocumentLanguage> SelectedLanguages(); 

Example

Visual BasicCopy Code
Public Sub SelectedLanguagesExample()
   ' Note that this is a sample key, which will not work in your toolkit
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")

   Dim rasterDocument As RasterDocumentEngine
   rasterDocument = RasterDocumentEngine.Instance
   rasterDocument.Startup()

   Dim lang As RasterDocumentLanguage() = rasterDocument.SelectedLanguages()
   MessageBox.Show("Total Selected Languages = " & lang.Length)

   Dim i As Integer = 0
   Do While i < lang.Length
      If lang(i) = RasterDocumentLanguage.English Then
         MessageBox.Show("English is active language")
      End If
      i += 1
   Loop

   If rasterDocument.IsCharacterEnabled("a"c) Then
      MessageBox.Show("The specified character is available in the selected langauges")
   Else
      MessageBox.Show("The specified character is not available in the selected langauges")
   End If

   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void SelectedLanguagesExample() 

   // Note that this is a sample key, which will not work in your toolkit 
   RasterSupport.Unlock(RasterSupportType.Ocr, "TestKey"); 
   RasterDocumentEngine rasterDocument; 
   rasterDocument = RasterDocumentEngine.Instance; 
   rasterDocument.Startup(); 
 
   RasterDocumentLanguage[] lang = rasterDocument.SelectedLanguages(); 
   MessageBox.Show("Total Selected Languages = " + lang.Length); 
 
   for(int i=0; i <lang.Length; i++) 
   { 
      if (lang[i] == RasterDocumentLanguage.English) 
         MessageBox.Show("English is active language"); 
   } 
 
   if (rasterDocument.IsCharacterEnabled('a')) 
      MessageBox.Show("The specified character is available in the selected langauges"); 
   else 
      MessageBox.Show("The specified character is not available in the selected langauges"); 
 
   rasterDocument.Shutdown(); 
}

Remarks

Retrieves an array that contains the current language selections.
To activate recognized languages, call SelectLanguages. The following properties are used to set or get the character options for the current activated languages: For more information, refer to Working with Languages.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Documentrequires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features