Community

How to enumerate supported languages? Answered

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.

Was this article helpful?

0 out of 0 found this helpful

Comments

2 comments

  • Avatar
    Anna Savinova

    Hello!

    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; }
    1
  • Avatar
    Permanently deleted user

    Thank you, that does the job. Sorry to take so long to reply.

    0

Please sign in to leave a comment.