Can't convert LCID to internal language name

  • 1.8K Views
  • Last Post 28 March 2014
ocr user posted this 22 March 2014

We are using engine by loading the FREngine.dll directly (using LoadLibraryEx). Before starting the recognition process we must provide the languages by using SetPredefinedTextLanguage property of RecognizerParams. Engine uses something called "internal". What is the function that converts LCID to engine internal language ?

Provide very simple example like this:

// User selected 2 languages - Spanish (United States) "es-US" LCID = 21514 and Japanese (Japan) "ja-JP" LCID = 1041
var lcids = new [] { 21514, 1041 };
// Or the following: - Spanish "es" LCID = 10 and Japanese "ja" LCID = 17
// var lcids = new [] { 10, 17 };
string ocrLanguages = ???

Order By: Standard | Newest | Votes
SDK_support posted this 28 March 2014

Could you provide us with more detailed scenario where you need to set predefined languages using LCIDs?

ocr user posted this 27 June 2014

  1. User wants to recognize some image
  2. ABBYY requires language(s) to be set so we must show a list with possible languages to the user to choose from
  3. In .NET we have access to ISO defined languages, their LCIDs and names - we can show such list but you can't convert standard LCID to your internal language
  4. Since user still needs to select which languages to be used for recognition, application needs either conversion function between standard LCID and ABBYY internal language or list with available ABBYY languages

Since you don't have such LCID-To-ABBYY-Internals conversion function, the question is what is ABBYY function that will return all available ABBYY languages in order to application to show this list to the user ? Making our own function based on manually typing all languages listed in help file is not an answer that anyone can accept !

SDK_support posted this 27 June 2014

You can get the list of available languages with the help of your license like the following:

  1. Get all languages by the PredefinedLanguages collection.
  2. Get InternalName for every element of the collection.
  3. Try to put this InternalName to RecognizerParams::SetPredefinedTextLanguage. If error message "Requested functionality is not available" then the language is not available and shouldn't be included in the list given to user.

We'll send a request to our analysts to consider the possibility of adding such functionality to FRE in future versions.

Close