Add term base entries automatically
Updated over a week ago

|| Term base entries can be added automatically with a CSV or TBX file import. Please read through the file specifications carefully. If your import file does not adhere to the specifications, your import will fail.

## File specifications

### TBX files

TBX files are the industry standard and enable the Term Base eXchange. LingoHub allows you to import TBX files adhering to the following standard:

* TBX V2 or TBX V3

* TBX-Basic dialect

### CSV files

For CSV files, there are two possible import methods, standard and advanced import. LingoHub will automatically decide which import to perform, depending on the header of your CSV file.

Not all, but only some columns are mandatory for your imports, depending on your import method. Your CSV header must, however, adhere to the following schematic:

```

entryId, entrySubject, entryDescription, entryTranslatable, term, termLocale, termContext, termPartOfSpeech, termUsageStatus, termGrammaticalGender, termType, termGrammaticalNumber, termMatching, termCaseSensitive, termIsSource, translation_{iso2Slug}

```

Below are the specifications for each field:

* entryId: `string` used to group terms and multiple translations; necessary for advanced imports (see below).

* entrySubject: `string` used to enable TBX subject support.

* entryDescription: `string` used to describe your term.

* entryTranslatable: `bool` that defines if the term is translatable or not. Default is set to `true`.

* term: `string` representing the term base entry.

* termLocale: `locale according to ISO 639-1` representing the term locale. For more information, check out the ISO 639-1 code specifications.

* termContext: `string` used to add context information to your term.

* termPartOfSpeech: Define if the term is: `noun`, `verb`, `adjective`, `adverb`, `proper_noun`, or `other`.

* termUsageStatus: Define the term usage: `preferred`, `admitted`, `not_recommended`, `obsolete`.

* termGrammaticalGender: Define the term gender: `masculine`, `feminine`, `neuter`, `other`.

* termType: Define the term type: `full_form`, `acronym`, `abbreviation`, `short_form`, `variant`, `phrase`.

* termGrammaticalNumber: Define the term grammatical number: `singular`, `plural`.

* termMatching: Define the term matching: `fuzzy`, `prefix`, `exact`, `custom`. Default is set to `prefix`.

* termCaseSensitive: Define the term case sensitivity: `yes`, `permissive`, `no`. Default is set to `yes`.

* termIsSource: `bool` that defines if the term is translatable or not.

* translation_{iso2Slug}: `locale according to ISO 639-1` representing the target language locale

|| **Note**: For in-depth explanations of the settings above, please check the term base article entry.

#### Standard import

Your CSV file will be read row by row. A standard CSV import will be triggered, if the variable `entryId` is not present in your CSV header.

The CSV header must be valid and contain at least these entries:

```

term,termLocale

```

| More optional specifications can be added, but the order must adhere to the previously mentioned schematic.

Below is an example of a valid CSV file content for a term base:

```

entryDescription,entryTranslatable,term,termLocale,translation_fr,translation_es

"Email address",true,email,en,Email,Courriel

"A place to live",true,Home,en,Maison,Casa

"Our company name",false,LingoHub,en,,

```

| You can add multiple translations for the same target language by adding the field translation_{ISO_639-1_language_designator} more than once:

```

entryDescription,entryTranslatable,term,termLocale,translation_de,translation_de

"A place to live",true,Home,en,Haus,Gebäude

```

|| **Note**: If you set a term to be not translatable, but add translations to it, the translation values will be ignored.

#### Advanced import

Your CSV file will be read row by row but will group terms by `entryID` if identical values exist. A standard CSV import will be triggered, if the variable `entryId` is not present in your CSV header.

The CSV header must respect the following specifications:

##### Valid header - the CSV file must contain at least these entries:

```

entryId,term,termLocale,termIsSource

```

| More optional specifications can be added, but the order must adhere to the previously mentioned schematic.

##### Valid entryIDs - `entryID` is defined as a `string`

You may choose one of the following:

* Distinguish between different terms by using different entryIds.

* Combine multiple translations of a term by using an identical entryId.

|| **Note**: You must define the source term as termIsSource first, before multiple translations in the same language can be added to it.

Below is an example of a valid CSV file content for a term base:

```

entryId,entryDescription,entryTranslatable,term,termLocale,termIsSource

email,"Email address",true,email,en,true

email,"",true,Courriel,es,false

email,"",true,Email,fr,false

email,"",true,E-Mail,de,false

email,"",true,Mail,de,false

house,"A place to live",true,house,en,true

house,"",true,Casa,es,false

house,"",true,Maison,fr,false

house,"",true,Haus,de,false

house,"",true,Gebäude,de,false

LingoHub,"Our company name",false,LingoHub,en,true

```

|| **Note**: If you set a term to be not translatable, but add translations to it, the translation values will be ignored.

## Add entries automatically

### Importing terms when creating a term base

1. On the **Create new term base** screen, select, or drag & drop, a valid TBX or CSV.

Create new term base

2. Click **Create new term base**.

### Importing terms to an existing term base

||| Importing term base entries from a file **overrides** previous entries. Please ensure all existing term base entries are present in your import file, e.g., through exporting your existing term base beforehand. ${color}[#ff0000]([Link to TB export])

1. Access the **term base overview**.

2. Click the action menu of the term base you want to add an entry to.

3. Click **Settings**.

⇨ You will be redirected to the **term base settings** page.

4. Click **Import file**.

5. Select, or drag & drop, your TBX or CSV file.

6. Click import.

Did this answer your question?