Find all the language files in a folder and fills ssDest with their display name or language code.
Language files of IEVision will be named with a language code followed by extensions such as traineddata (IEV_OCR_Language_Data_Ext), word-freq, params, size, etc.
procedure TMainForm.FormCreate(Sender: TObject); begin // Fill our Combobox with available languages IEVisionGetLanguagesInFolder(cmbLanguage.Items, ExtractFilePath(Application.ExeName), True);
// Default to English cmbLanguage.ItemIndex := cmbLanguage.Items.IndexOf(IEOCRLanguageList[OCR_English_language].DisplayName); end;
procedure TMainForm.btnRecognizeClick(Sender: TObject); var sLangCode: string; begin // Get selected language code sLangCode := IEVisionLanguageNameToCode(cmbLanguage.Text);