> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BaseLanguage Object (IBaseLanguage Interface)

This object represents a base recognition language. The [TextLanguage](/fine-reader/engine/api-reference/language-related-objects/textlanguage) object — a recognition language for a text — contains a collection of base languages. For example, English or French languages may be represented by base languages. This object provides access to a base language attributes and allows you to get/set its internal name, letter sets, dictionary type, etc.

The BaseLanguage object is a persistent object. This means that the object's current state can be written to persistent storage. Later, the object can be re-created by reading the object's state from the persistent storage. The following methods provide persistence of the object:

Linux: [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method), and [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)

Windows: [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method), [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method), [SaveToMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method), and [LoadFromMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method).

## Properties

<table><thead><tr><th><p><strong>Name</strong></p></th><th><p><strong>Type</strong></p></th><th><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p><strong>Application</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/engine-object-iengine-interface">Engine</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>Returns the <strong>Engine</strong> object.</p></td></tr><tr><td colspan="3"><p><em>Main attributes</em></p></td></tr><tr><td><p><a name="languageid" /><strong>LanguageId</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/enumerations/languageidenum">LanguageIdEnum</a></strong></p></td><td><p>Defines the ID of the language. To convert it to Win32 LCID use the <strong><a href="/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/convertlanguageidtolcid-method">IEngine::ConvertLanguageIdToLCID</a></strong> method.</p><p>By default, this property is initialized with the system default language ID.</p></td></tr><tr><td><p><strong>InternalName</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">BSTR</a></strong></p></td><td><p>Specifies the internal name of the base language. This name appears as an attribute of a character in the recognized text, so it is recommended that it were unique.</p><p>The property is an empty string by default.</p></td></tr><tr><td><p><strong><a href="/fine-reader/engine/api-reference/language-related-objects/baselanguage/letterset-property">LetterSet</a></strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">BSTR</a></strong></p></td><td><p>Provides access to the specified letter set of the base language.</p></td></tr><tr><td><p><a name="dictionarydescriptions" /><strong>DictionaryDescriptions</strong></p></td><td><p><strong><a href="/fine-reader/engine/api-reference/language-related-objects/dictionarydescriptions">DictionaryDescriptions</a></strong>, <a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties">read-only</a></p></td><td><p>Returns a reference to the dictionary collection.</p></td></tr><tr><td colspan="3"><p><em>Additional attributes</em></p></td></tr><tr><td><p><a name="isnaturallanguage" /><strong>IsNaturalLanguage</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies if this base language is a natural language. Natural languages are designed for recognizing common texts. Formal languages are not natural ones.</p><Note>If this property is TRUE, ABBYY FineReader Engine uses some additional information about the languages during recognition (for example, it can presume that the language can include not only alphabet characters but some other constructions like telephone numbers or URLs). If the property is FALSE, ABBYY FineReader Engine uses only the attributes specified in the language properties, no other information is used.</Note><p>By default, the value of this property is FALSE.</p></td></tr><tr><td><p><a name="allowwordsfromdictionaryonly" /><strong>AllowWordsFromDictionaryOnly</strong></p></td><td><p><strong><a href="/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties">VARIANT\_BOOL</a></strong></p></td><td><p>Specifies if only the dictionary words are allowed during recognition in this base language. If this property is TRUE, a word that is not found in the dictionary of the base language can appear in the recognized text only if ABBYY FineReader Engine found no dictionary variants. If no dictionary is associated with the base language, the language will not be used for recognition.</p><p>By default, the value of this property is FALSE.</p></td></tr><tr><td><p><strong><a href="/fine-reader/engine/api-reference/language-related-objects/baselanguage/userproperty-property">UserProperty</a></strong></p></td><td><p><strong>VARIANT</strong></p></td><td><p>Allows you to associate some user-defined information of any type with the <strong>BaseLanguage </strong>object.</p></td></tr></tbody></table>

## Methods

| Name                                                                                                                                               | Description                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [CopyFrom](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/copyfrom-method)                              | Initializes properties of the current object with values of similar properties of another object. |
| [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)                                            | Restores the object contents from a file on disk.                                                 |
| [LoadFromMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method) <br /><br /> **Note:** *Windows only.* | Restores the object contents from the global memory.                                              |
| [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method)                                                | Saves the object contents into a file on disk.                                                    |
| [SaveToMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method) <br /><br /> **Note:** *Windows only.*     | Saves the object contents into the global memory.                                                 |

## Related objects

<img src="https://mintcdn.com/abbyy/6udH-pkk8zkVafYH/images/fine-reader/engine/baselanguage.gif?s=c2acab4fc786a6b6c2f35de3fba11b61" alt="BaseLanguage" width="157" height="121" data-path="images/fine-reader/engine/baselanguage.gif" />[](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/element-property)[](/fine-reader/engine/api-reference/language-related-objects/dictionarydescriptions)[](/fine-reader/engine/api-reference/language-related-objects/baselanguages)[](/fine-reader/engine/api-reference/language-related-objects/textlanguage)

[Object Diagram](/fine-reader/engine/api-reference/object-diagram)

## Output parameter

This object is the output parameter of the [Item](/fine-reader/engine/visual-components-reference/supplementary-objects/spellwordcollection/item-method), [AddNew](/fine-reader/engine/api-reference/supplementary-objects-and-methods/addnew-method) methods of the [BaseLanguages](/fine-reader/engine/api-reference/language-related-objects/baselanguages) object.

## Samples

<Accordion title="C# code">
  ```csharp theme={null}
  // We presume that a new TextLanguage object have been created
  // and all its attributes have been copied from a predefined language
  // Obtain the first BaseLanguage object within TextLanguage
  BaseLanguage baseLanguage = textLanguage.BaseLanguages[0];
  // Change internal language name to user-defined
  baseLanguage.InternalName = "SampleBaseLanguage";
  // Set a user dictionary for the base language
  IDictionaryDescriptions dictionaryDescriptions = baseLanguage.DictionaryDescriptions;
  dictionaryDescriptions.DeleteAll();
  IDictionaryDescription dictionaryDescription = dictionaryDescriptions.AddNew( DictionaryTypeEnum.DT_UserDictionary );
  IUserDictionaryDescription userDictionaryDescription = dictionaryDescription.GetAsUserDictionaryDescription();
  userDictionaryDescription.FileName = "D:\\SampleDictionary.amd";
  // Use the text language for recognition
  ...
  ```
</Accordion>

The object is used in the following code samples for Linux and Windows: [CustomLanguage](/fine-reader/engine/guided-tour/samples#customlanguage).

## See also

[BaseLanguages](/fine-reader/engine/api-reference/language-related-objects/baselanguages)

[Working with Languages](/fine-reader/engine/guided-tour/advanced-techniques/working-with-languages)

[Working with Dictionaries](/fine-reader/engine/guided-tour/advanced-techniques/working-with-dictionaries)

[Working with Properties](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
