GET
/
dictionaries
curl --request GET \
  --url https://client.camb.ai/apis/dictionaries \
  --header 'x-api-key: <api-key>'
[
  {
    "id": 123,
    "name": "<string>",
    "description": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]
Dictionaries can be created and managed either through the CAMB.AI Studio interface or programmatically via the CAMB.AI APIs.

Understanding Terminology Management in Localization

Dictionaries are centralized repositories for terminology management across languages, essential for maintaining consistent terminology in specialized industries and branded materials. CAMB.AI’s dictionary system ensures key terms, product names, and industry jargon remain consistent throughout localized content.

Each dictionary in your workspace contains curated terminology pairs defining how specific terms should be translated across target languages, addressing one of localization’s key challenges: consistent and accurate specialized vocabulary.

The Role of Dictionaries in Your Localization Pipeline

Dictionaries enhance your translation workflows by:

  1. Ensuring Terminology Consistency across all translations regardless of context
  2. Preserving Domain Expertise by encoding specialized knowledge
  3. Protecting Brand Language across multiple languages
  4. Streamlining Quality Control by establishing pre-approved translations

Within CAMB.AI, dictionaries integrate seamlessly with translation workflows, automatically applying terminology rules during content processing.

Using This Endpoint

To retrieve all dictionaries in your workspace:

GET /dictionaries

No parameters required. Authentication occurs via your API key.

Dictionary Management Workflow

Dictionaries can be created, updated, and deleted through either the CAMB.AI Studio interface or directly via REST API calls. Below is an overview of both approaches:

1. Via CAMB.AI Studio

  1. Create dictionaries via Studio, organized by domain or project or by uploading a file that contains your terms and their translations. Refer to this page for more details.
  2. Add terminology entries with source terms and approved translations
  3. Retrieve dictionary information via API or Studio to identify available dictionaries
  4. Apply dictionaries to translations by referencing their IDs in requests

2. Programmatically via API

The CAMB.AI API now exposes endpoints to fully manage dictionaries and their entries. Use these endpoints to build CI/CD pipelines, integrate with custom tools, or automate bulk imports/exports.

Integrating Dictionaries into Translation Workflows

Apply dictionaries in two primary ways:

1. Direct Application in Translation Requests

Specify dictionary IDs when making translation requests:

{
  "source_language": "1", // English (US)
  "target_language": "54", // Spanish (Spain)
  "text": "The patient's vital signs remained stable throughout the procedure.",
  "dictionaries": [42, 63]  // Apply Medical and Legal dictionaries
}

2. Dictionary Selection Based on Content Type

Select dictionaries programmatically based on content analysis:

# Pseudo-code example
def translate_with_appropriate_dictionaries(text, source_lang, target_lang):
    # Get available dictionaries
    dictionaries = requests.get(
        "https://client.camb.ai/apis/dictionaries",
        headers={"x-api-key": API_KEY}
    ).json()['dictionaries']

    # Select dictionaries based on content
    selected_dictionary_ids = []
    if contains_medical_terms(text):
        medical_dict = next((d for d in dictionaries if d['name'] == 'Medical Terminology'), None)
        if medical_dict:
            selected_dictionary_ids.append(medical_dict['id'])

    # Translate with selected dictionaries
    return requests.post(
        "https://client.camb.ai/apis/translate",
        json={
            "source_language": source_lang,
            "target_language": target_lang,
            "text": text,
            "dictionaries": selected_dictionary_ids
        },
        headers={"x-api-key": API_KEY}
    ).json()

Best Practices for Dictionary Management

For effective dictionary implementation:

  1. Maintain Regularly: Establish review cycles and track updates using the updated_at timestamp
  2. Apply Strategically: Use complementary dictionaries and consider application order when terminologies overlap
  3. Govern Collaboratively: Establish clear ownership and documentation standards for dictionaries

The /dictionaries endpoint works in conjunction with several other endpoints in the CAMB.AI API ecosystem:

This interconnected system provides comprehensive support for terminology management throughout your localization workflow.

Authorizations

x-api-key
string
header
required

The x-api-key is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.

Response

200
application/json

Successful Response

The response is of type object[].