Manage Glossaries

Lara’s Glossaries feature gives you full control over domain-specific terminology to ensure consistent, predictable, and brand-aligned translations across your applications.

Glossary Models

Lara provides two glossary models to match your localization strategy:

  • Monodirectional glossaries for strict source → target control
  • Multidirectional glossaries that work across all language combinations inside the same file

Whether you're managing product terminology, legal vocabulary, marketing copy, or technical terms, Lara ensures your preferred terminology is enforced across translations, documents, and API workflows.

With this feature, you can:

  • List existing glossaries to manage your translation assets.
  • Create new glossaries tailored to specific projects or clients.
  • Update glossary names to keep your workspace organized.
  • Delete glossaries that are no longer needed.
  • Add or replace entries programmatically.
  • Import terms via CSV (mono or multi-directional).
  • Check the status of your imports.
  • Export glossaries for backup or reuse.

All glossary functionalities are accessible via the same Translator (lara in the examples below) object used for translation.


📘

Pro & Team Only

This feature is currently available only to Lara Pro and Team subscribers. See plans & pricing.


Glossary object

The Glossary object describes a glossary resource and its metadata.

FieldTypeDescription
idStringUnique ID of the glossary. Format: gls_xyz123
nameStringCustom name of the glossary; it can be any string, including spaces, special characters, and non-Latin alphabets. Max length: 250 characters.
created_atDateTimeWhen the glossary is created
updated_atDateTimeWhen the glossary is last updated (equal to created_at with no updates)
owner_idStringUser who owns the glossary. Format: acc_123xyz

List Glossaries

Lists all glossaries available to the user

# List all glossaries available to the user
glossaries = lara.glossaries.list()
// List all glossaries available to the user
const glossaries = await lara.glossaries.list();
// List all memories available to the user
List<Glossary> glossaries = lara.glossaries.list();
// List all glossaries available to the user
$glossaries = $lara->glossaries->getAll();
// List all glossaries available to the user
glossaries, _ := lara.Glossaries.List()
// List all glossaries available to the user
val glossaries: List<Glossary> = lara.glossaries.list()
// List all glossaries available to the user
var glossaries = await lara.Glossaries.List();
// List all glossaries available to the user
let glossaries = try await lara.glossaries.list()

Create new Glossary

Creates a new glossary with a custom name.

# Create a new empty glossary with name 'Glossary 1'
glossary = lara.glossaries.create('Glossary 1')
// Create a new empty glossary with name 'Glossary 1'
const glossary = await lara.glossaries.create('Glossary 1');
// Create a new empty glossary with name 'Glossary 1'
Glossary glossary = lara.glossaries.create("Glossary 1");
// Create a new empty glossary with name 'Glossary 1'
$glossary = $lara->glossaries->create('Glossary 1');
// Create a new empty glossary with name 'Glossary 1'
newGlossary, _ := lara.Glossaries.Create("Glossary 1")
// Create a new empty glossary with name "Glossary 1"
val glossary: Glossary = lara.glossaries.create("Glossary 1")
// Create a new empty glossary with name 'Glossary 1'
var glossary = await lara.Glossaries.Create("Glossary 1");
// Create a new empty glossary with name 'Glossary 1'
let glossary = try await lara.glossaries.create(name: "Glossary 1")

Field

Type

Required

Default

Description

name

String

Yes


The name of the new glossary

Update Glossary Name

Updates the name of a specific glossary

# Update glossary name
updated_glossary = lara.glossaries.update('gls_1...', 'New Name for my glossary')
// Update glossary name
const updatedGlossary = await lara.glossaries.update('gls_1...', 'New Name for my glossary');
// Update glossary name
Glossary updatedGlossary = lara.glossaries.update("gls_1...", "New Name for my glossary");
// Update glossary name
$updatedGlossary = $lara->glossaries->update('gls_1...', 'New Name for my glossary');
// Update glossary name
updatedGlossary, _ := lara.Glossaries.Update("gls_1...", "New Name for my glossary")
// Update glossary name
val updatedGlossary: Glossary = lara.glossaries.update("gls_1...", "New Name for my glossary")
// Update glossary name
var updatedGlossary = await lara.Glossaries.Update("gls_1...", "New Name for my glossary");
// Update glossary name
let updatedGlossary = try await lara.glossaries.update(id: "gls_1...", name: "New Name for my glossary")

Field

Type

Required

Default

Description

id

String

Yes


The unique identifier of the glossary to update. Format: gls_xyz123

name

String

Yes


The new name for the glossary

Delete Glossary

Deletes a specific glossary

# Delete a glossary
deleted_glossary = lara.glossaries.delete('gls_1...')
// Delete a glossary
const deletedGlossary = await lara.glossaries.delete('gls_1...');
// Delete a glossary
Glossary deletedGlossary = lara.glossaries.delete("gls_1...");
// Delete a glossary
$deletedGlossary = $lara->glossaries->delete('gls_1...');
// Delete a glossary
deletedGlossary, _ := lara.Glossaries.Delete("gls_1...")
// Delete a glossary
val deletedGlossary: Glossary = lara.glossaries.delete("gls_1...")
// Delete a glossary
var deletedGlossary = await lara.Glossaries.Delete("gls_1...");
// Delete a glossary
let deletedGlossary = try await lara.glossaries.delete(id: "gls_1...")

Field

Type

Required

Default

Description

id

String

Yes


The unique identifier of the glossary to delete. Format: gls_xyz123

Add or replace Glossary Entry

Add or replace a specific glossary entry


lara.glossaries.add_or_replace_entry(
                glossary.id,
                [
                    GlossaryTerm(language=source, value="cat"),
                    GlossaryTerm(language=target, value="gatto"),
                ],
            )
// Add or replace a mono-directional entry from a Glossary
lara.glossaries.addOrReplaceEntry(glossary.id, [
        { language: source, value: "cat" },
        { language: target, value: "gatto" }
      ])

// Add or replace a multi-directional entry from a  Glossary
lara.glossaries.addOrReplaceEntry(glossary.id, [
  { language: source, value: "cat" },
  { language: target, value: "gatto" }
], 'guid')
// Add or replace a mono-directional entry from a Glossary
lara.glossaries.addOrReplaceEntry(glossary.getId(), Arrays.asList(
    new GlossaryTerm(source, "cat"),
    new GlossaryTerm(target, "gatto")
));

// Add or replace a multi-directional entry from a  Glossary
lara.glossaries.addOrReplaceEntry(glossary.getId(), Arrays.asList(
    new GlossaryTerm(source, "cat"),
    new GlossaryTerm(target, "gatto")
), "guid");

$lara->glossaries->addOrReplaceEntry($glossary->getId(), [
            ['language' => $source, 'value' => 'cat'],
            ['language' => $target, 'value' => 'gatto']
        ]);

// Sdk available soon

// Sdk available soon

var terms = new List<GlossaryTerm>
                    {
                        new("en-US", "computer"),
                        new("it-IT", "computer")
                    };
await lara.Glossaries.AddOrReplaceEntry(glossaryId, terms);

// Sdk available soon

Delete Glossary Entry

Delete a specific glossary entry


lara.glossaries.delete_entry(
                glossary.id,
                term=GlossaryTerm(language=source, value="cat"),
            )
// Delete a mono-directional entry from a glossary
await lara.glossaries.deleteEntry(glossary.id, {language: source, value: "cat"});

// Delete a multi-directional entry from a glossary
await lara.glossaries.deleteEntry(glossary.id, null, "guid");
// Delete mono-directional entry from a glossary
lara.glossaries.deleteEntry(glossary.getId(), new GlossaryTerm(source, "cat"));
  
// Delete multi-directional entry from a glossary
lara.glossaries.deleteEntry(glossary.getId(), "guid");


$lara->glossaries->deleteEntry($glossary->getId(), ['language' => $source, 'value' => 'cat']);

// Sdk available soon

// Sdk available soon

await lara.Glossaries.DeleteEntry(glossaryId, new GlossaryTerm("en-US", "computer"));
// Delete entry on monodirectional Glossary
lara.glossaries.deleteEntry(glossary.id, { language: source, value: "cat" })

// Delete entry on multidirectional Glossary
lara.glossaries.deleteEntry(glossary.id, 'guid')

Import CSV to Glossary

You can import a CSV file into an existing glossary to bulk upload terms. Currently, Lara supports both monodirectional and multidirectional glossaries.

A unidirectional glossary unit consists of a list of glossary terms that work in one direction only — from a defined source term to one or more target terms. The first column defines the source language, and all other columns are target languages.

Unidirectional entries are uniquely identified by the combination of the source language and the source term. That tuple acts as the key.

Lara CSV Glossary Format Specification

Lara supports two CSV formats, depending on the glossary type you want to import:

  • Monodirectional CSV: first column is the source language
  • Multidirectional CSV: first column is an entry identifier, then language columns

For the full list of supported language codes, see here


Monodirectional CSV

Monodirectional glossaries work in one direction only, from a source term to one or more target terms.

Header row

The first row must contain valid language codes.

  • The first column is always the source language.
  • All other columns are target languages.

Example header:

en-US,fr-FR,it-IT

Row structure

Each row defines one source term and its translations.

Example:

en-USfr-FRit-IT
applepommemela

CSV file:

en-US,fr-FR,it-IT apple,pomme,mela

Behavior:

  • Matches: apple (en-US) → pomme (fr-FR)
  • Matches: apple (en-US) → mela (it-IT)
  • Does not match reverse or target-to-target directions

Requirements:

  • Each row must include a source term and at least one target term.
  • Empty cells are allowed, but at least one target term per row is required.

Need a ready-to-use example?
Download the template for monodirectional glossary.

Download the template for multidirectional glossary.

The zip file includes a CSV template and an instructions.txt file explaining the template structure.


Multidirectional CSV

Multidirectional glossaries apply across all language combinations inside the file.

Each row represents one multilingual concept, identified by a unique ID.

Header row

The first column must be an entry identifier column.

The column name must be either:

  • guid
  • id

No other column names are allowed for the entry identifier.

Columns 2..N must contain valid Lara supported language codes (e.g. en, en-US, fr-FR, it-IT).

Language codes:

  • Must match exactly the supported language codes in Lara
  • Must not be duplicated
  • Order does not matter
  • At least two language columns are required

Example header:

guid,en-US,fr-FR,it-IT

Row structure

Each row must provide:

  • a non-empty guid
  • at least two non-empty language values (so the entry can work in at least one direction)

Example:

guiden-USfr-FRit-IT
g_1applepommemela

CSV file:

guid,en-US,fr-FR,it-IT g_1,apple,pomme,mela

Behavior:

This single row applies to all combinations among the provided languages:

  • en-US → fr-FR, fr-FR → en-US
  • en-US → it-IT, it-IT → en-US
  • fr-FR → it-IT, it-IT → fr-FR

Requirements:

  • guid must be present and non-empty for every row.
  • guid values must be unique within the file.
  • Each row must contain at least two non-empty language values.
  • Empty cells are allowed, but translations involving that missing language value cannot be enforced for that row.

Need a ready-to-use example? Download the template for multidirectional glossary. The zip file includes a CSV template and an instructions.txt file explaining the template structure.

Below are examples showing how to import both monodirectional and multidirectional CSV glossaries.

# Import a local csv file to an existing glossary
# Import a unidirectional CSV file (default)
import_job = lara.glossaries.import_csv('gls_1...', 'path/to/file.csv')

# Import a multidirectional CSV file
import_job = lara.glossaries.import_csv('gls_1...', 'path/to/file.csv', content_type='csv/table-multi')
/*
	NODE
*/
import * as fs from 'fs';

// Import a local csv file to an existing glossary
// Import unidirectional CSV
const stream = fs.createReadStream('path/to/csv');
const importJob = await lara.glossaries.importCsv('gls_1...', stream, 'csv/table-uni');

// Import multidirectional CSV
const importJobMulti = await lara.glossaries.importCsv('gls_1...', stream, 'csv/table-multi');

// Import a local compressed csv file to an existing glossary
const streamGzip = fs.createReadStream('path/to/csv.gz');
const importJobGzip = await lara.glossaries.importCsv('gls_1...', streamGzip, true)

/*
	BROWSER
*/
// replace with your input id
const fileInput = document.getElementById("fileInput");
const file = fileInput.files[0];

// Import unidirectional CSV
const importJob = await lara.glossaries.importCsv('gls_1...', file, 'csv/table-uni', false);

// Import multidirectional CSV
const importJobMulti = await lara.glossaries.importCsv('gls_1...', file, 'csv/table-multi', false);

// Import compressed CSV (gzip=true)
const importJobGzip = await lara.glossaries.importCsv('gls_1...', file, 'csv/table-uni', true);
// Import a local csv file to an existing glossary
// Import unidirectional CSV (default)
GlossaryImport importJob = lara.glossaries.importCsv("gls_1...", new File("path/to/file.csv"));

// Import multidirectional CSV
GlossaryImport importJobMulti = lara.glossaries.importCsv("gls_1...", new File("path/to/file.csv"), Glossary.Type.CSV_TABLE_MULTI);

// Import compressed CSV
GlossaryImport importJobGzip = lara.glossaries.importCsv("gls_1...", new File("path/to/file.csv.gz"), Glossary.Type.CSV_TABLE_UNI, true);
// Import a local csv file to an existing glossary
// Import unidirectional CSV (default)
$importJob = $lara->glossaries->importCsv('gls_1...', $csvFilePath);

// Import multidirectional CSV
$importJobMulti = $lara->glossaries->importCsv('gls_1...', $csvFilePath, GlossaryFileFormat::CSV_TABLE_MULTI);

// Import compressed CSV
$importJobGzip = $lara->glossaries->importCsv('gls_1...', $csvFilePath, true);
// Import a local csv file to an existing glossary
// Import unidirectional CSV (default)
importJob, err := lara.Glossaries.ImportCsvFromPath("gls_1...", "path/to/file.csv")

// Import multidirectional CSV
importJob, err := lara.Glossaries.ImportCsvFromPathWithFormat("gls_1...", "path/to/file.csv", lara.GlossaryFileFormatCsvTableMulti)

// Import from file handle (auto-detects gzip from .gz extension)
file, _ := os.Open("path/to/file.csv")
importJob, err := lara.Glossaries.ImportCsvWithFormat("gls_1...", file, lara.GlossaryFileFormatCsvTableUni)
// Import a local CSV file to an existing glossary
// Import unidirectional CSV (default)
val importJob = lara.glossaries.importCsv("gls_1...", File("path/to/file.csv"))

// Import multidirectional CSV
val importJobMulti = lara.glossaries.importCsv("gls_1...", File("path/to/file.csv"), Glossary.Type.CSV_TABLE_MULTI)

// Import compressed CSV
val importJobGzip = lara.glossaries.importCsv("gls_1...", File("path/to/file.csv.gz"), Glossary.Type.CSV_TABLE_UNI, true)
// Import a local csv file to an existing glossary
var importJob = await lara.Glossaries.Import("gls_1...", "path/to/file");
// Import a local CSV file to an existing glossary
let csvURL = URL(fileURLWithPath: "path/to/file.csv")
let csvData = try Data(contentsOf: csvURL)

// Import unidirectional CSV (default)
let importJob = try await lara.glossaries.importCsv(id: "gls_1...", csv: csvData)

// Import multidirectional CSV
let importJobMulti = try await lara.glossaries.importCsv(id: "gls_1...", csv: csvData, contentType: .csvTableMulti)

// Import compressed CSV
let importJobGzip = try await lara.glossaries.importCsv(id: "gls_1...", csv: csvData, contentType: .csvTableUni, gzip: true)

Field

Type

Required

Default

Description

id

String

Yes


The unique identifier of the glossary to update. Format: gls_xyz123

csv

File | Stream | String

Yes


The CSV file to upload

contentType

String

No

csv/table-uni

CSV format: csv/table-uni (unidirectional), csv/table-multi (multidirectional)

gzip

Boolean

No

False

Indicates if the file is a compressed .gz file. Not present for Python and Java, where it is automatically detected.

Check Import Status

Checks the status of an ongoing glossary import using the unique import_job id returned in the “Import CSV” method

# Check the status of an import job
import_job = lara.glossaries.get_import_status('imp_1...')
// Check the status of an import job
const importJob = await lara.glossaries.getImportStatus('imp_1...');
// Check the status of an import job
GlossaryImport importJob = lara.glossaries.getImportStatus("gls_1...");
// Check the status of an import job
$importJob = $lara->glossaries->getImportStatus('gls_1...');
// Check the status of an import job
importJob, _ := lara.Glossaries.GetImportStatus("imp_1...")
// Check the status of an import job
val importJob: GlossaryImport = lara.glossaries.getImportStatus("gls_1...")
// Check the status of an import job
var importJob = await lara.Glossaries.GetImportStatus("imp_1...");
// Check the status of an import job
let importJob = try await lara.glossaries.getImportStatus(id: "imp_1...")

Field

Type

Required

Default

Description

id

String

Yes


The ID of the import job

The import status is an object containing:

Field

Type

Description

id

String

The ID of the import job

progress

Number

The current status of the import job. If it is = 1, it means the import is complete. If < 1, it means the import is still in progress.

Get counts

The counts object gives information about the content of a glossary.

FieldTypeDescription
unidirectionalRecord<string, number>The object is a field for each source language of the glossary, and its value represents the number of elements defined for that language
# Get the counts for a glossary
counts = lara.glossaries.counts('gls_1...')
// Get the counts for a glossary
const counts = await lara.glossaries.counts('gls_1...');
// Get the counts for a glossary
GlossaryCounts counts = lara.glossaries.counts("gls_1...");
// Get the counts for a glossary
$counts = $lara->glossaries->counts("gls_1...");
// Get the counts for a glossary
counts, _ := lara.Glossaries.Counts("gls_1...")
// Get the counts for a glossary
val counts: GlossaryCounts = lara.glossaries.counts("gls_1...")
// Get the counts for a glossary
var counts = await lara.Glossaries.Counts("gls_1...");
// Get the counts for a glossary
let counts = try await lara.glossaries.counts(id: "gls_1...")

Field

Type

Required

Default

Description

id

String

Yes


The ID of the glossary Format: gls_xyz123

Export glossary

You can export a glossary as a CSV file, formatted according to the Lara CSV Glossary Format.

# Export unidirectional (source required)
csv_data = lara.glossaries.export('gls_1...', content_type='csv/table-uni', source='en-US')

# Export multidirectional
csv_data = lara.glossaries.export('gls_1...', content_type='csv/table-multi')
// Export unidirectional (source required)
const csvData = await lara.glossaries.export('gls_1...', 'csv/table-uni', 'en-US');

// Export multidirectional
const csvDataMulti = await lara.glossaries.export('gls_1...', 'csv/table-multi');
// Export unidirectional (source required)
String csvData = lara.glossaries.export("gls_1...", Glossary.Type.CSV_TABLE_UNI, "en-US");

// Export multidirectional
String csvDataMulti = lara.glossaries.export("gls_1...", Glossary.Type.CSV_TABLE_MULTI);
// Export unidirectional (source required)
$csvData = $lara->glossaries->export('gls_1...', GlossaryFileFormat::CSV_TABLE_UNI, 'en-US');

// Export multidirectional
$csvDataMulti = $lara->glossaries->export('gls_1...', GlossaryFileFormat::CSV_TABLE_MULTI);
// Export unidirectional (source required)
csvData, err := lara.Glossaries.Export("gls_1...", lara.GlossaryFileFormatCsvTableUni, ptr("en-US"))

// Export multidirectional
csvData, err := lara.Glossaries.Export("gls_1...", lara.GlossaryFileFormatCsvTableMulti, nil)
// Export unidirectional (source required)
val csvData = lara.glossaries.export("gls_1...", Glossary.Type.CSV_TABLE_UNI, "en-US")

// Export multidirectional
val csvDataMulti = lara.glossaries.export("gls_1...", Glossary.Type.CSV_TABLE_MULTI)
// Export a glossary
var glossaryContent = await lara.Glossaries.Export("gls_1...", "csv/table-uni", "en-US");
// Export unidirectional (source required)
let csvData = try await lara.glossaries.export(id: "gls_1...", format: .csvTableUni, source: "en-US")

// Export multidirectional
let csvDataMulti = try await lara.glossaries.export(id: "gls_1...", format: .csvTableMulti)

Field

Type

Required

Default

Description

id

String

Yes


The ID of the glossary Format: gls_xyz123

contentType

String

Yes


  • cvs/table-uni to extract mono-directional entries with the specified source language.
  • cvs/table-multi to extract multi-directional entries.

source

String

Yes (for unidirectional glossaries)


The source language of the glossary


Availability of Glossaries in SDKs

Starting from the following SDK versions, the Glossary feature is available:

  • Python: v1.4.0
  • Node.js (TypeScript/JavaScript): v1.6.0
  • Java: v1.4.0
  • PHP: v1.2.0
  • Go: 1.0.0
  • .NET: 1.0.0
  • Swift: v1.0.0

For more details on implementation, refer to the SDK-specific documentation.