How to enumerate supported languages?

  • Last Post 4 days ago
Leif posted this 2 weeks ago

Is there a way to enumerate the supported languages (either all languages supported, or only those languages available on the given PC)? What I would like to do is enumerate the languages, get the text strings e.g. "Arabic", and then present the user with a list so they can choose the languages they want when using our front end.

According to the manual, the LanguageIdEnum defines the complete set of supported languages, and each item is easily converted into a Windows LANGID. But I don't see a way to step over the items.

We use the C++ interface to the ABBYY OCR Engine.

Anna Savinova posted this 4 days ago


You can get available languages list via AvailablePredefinedLanguages of FREngine.

FREngine::IPredefinedLanguagesPtr predefinedLanguages = Engine->GetAvailablePredefinedLanguages();

for (int i = 0; i < predefinedLanguages->GetCount(); ++i) {
    FREngine::IPredefinedLanguagePtr predefinedLanguage = predefinedLanguages->Item(i);

std::cout << predefinedLanguage->GetExternalName() << std::endl; }