Gets the current selected languages.
Syntax
Example
Visual Basic | Copy Code |
---|
Public Sub SelectedLanguagesExample()
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
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also