Adopt DeepL Glossary now to unify terminology across your projects and shorten review cycles. A centralized glossary keeps domain terms aligned with client expectations, whether you work in legal, tech, or life sciences, and it scales with your team as you grow.

Monitor progress with precise metrics: term coverage, alias mappings, and per-language overrides. Create a dedicated glossary_id per client or project, then import your lists via glossaryinputuri. Start by init the glossary, then run import through the CLI to populate entries, while keeping a clear parent relationship for nested terms.

Workflow tip: use sample datasets to validate mappings before you deploy, and keep a slim glossary_input file to avoid drift. With a parent project structure and versioned imports, you can roll back a change in minutes if needed.

Note: 将请求正文保存在名为,result,post,版格式的输入文件此示例说明了所需的结构,interruptedexception,construct,glossaryinputuri,init,glossary_id,import,cli您可以运行,sample,parent

Take control of terminology and deliver consistent translations faster with DeepL Glossary–start your trial today and see how term consistency translates into higher client satisfaction and faster delivery.

DeepL Glossary: Terminology for Translators and Language Professionals

Begin with a concrete setup: use project_number_or_idlocationsus-central1glossariesglossary-id, set location to global, and configure inputconfig to map source languages to target languages. Run a sample import from gcssource and submit a rest request using applicationjson payloads. This creates a glossary entry ready for lookups in production.

Glossary setup and workflow

Define parent and child glossary relationships, populate metadata, and construct a clear term map that pairs source terms with translations. Use cred for authentication, then issue requests to the glossary rest API. Monitor running status and catch interruptedexception to retry or route to a fallback path. The result should reflect a kept history for downstream tools.

Validation and auditing

For languagecodesset, include languages and codes, and ensure the payload aligns with languages and languagecodesset before import. The rest API expects languages and languagecodesset fields in the same payload. Validate result and update glossary-id accordingly, without disrupting existing data. Use metadata to store version, source, and gcssource.

重要提示 将请求正文保存在名为 glossary_request.json, global.

Node.js: Build a Glossary Resource for Translators

Use a focused Node.js utility to build a glossary resource for translators. Store assets in utf-8 under a parent folder, and structure data around glossary_id and inputconfig. The CLI accepts a sample input and outputs a complete glossary in both requestjson and applicationjson payloads, with an authorization header to control access and a languagecodesset grouping for languages. The resource is designed to be global for reuse across teams.

The data model centers on glossary_id as the unique key, inputconfig for parsing rules, and a root glossary with entries that map source_term to translations per language. The 版格式的输入文件此示例说明了所需的结构 shows how to shape fields such as source_term, translations, and notes. Use languagecodesset to enumerate codes and target_lang_code to generate results for the destination language.

Data model and workflow

glossary_id identifies the glossary as the primary key, inputconfig defines parsing and validation rules, and global scope ensures reuse across projects. The structure supports languagecodesset mappings and target_lang_code for producing translations in a chosen language. Ensure utf-8 encoding across all saved assets and honor the parent directory layout for easy discovery and backup.

In the input, include sample entries that pair a source_term with translations under languagecodesset entries. The 版格式的输入文件此示例说明了所需的结构 portion demonstrates how to embed notes and metadata alongside term pairs to aid reviewers and QA checks.

cli您可以运行 a compact CLI to trigger glossary generation from a local file; this helps reviewers validate entry pairs before publishing. 您应该收到类似以下内容的 response after a successful run, confirming keys glossary_id and inputconfig exist and the produced files reside under the global namespace.

For API-driven workflows, use requests to POST payloads with authorization headers and accept responses in requestjson and applicationjson formats. On Windows, powershell scripts can automate uploading, validation, and logging to reduce manual steps while handling potential interruptedexception events gracefully.

REST: Clean Up Invalid Search Terms in Glossaries

Validate and filter search terms at the edge using a dedicated REST endpoint that rejects invalid terms before they reach the glossary index.

Validation rules

Implementation details

  1. Endpoint design: expose a REST route that accepts POST with requestjson payload and supports async processing; the response should include a requesturi or a job id.
  2. Data flow: client sends terms; server validates, sanitizes, and writes clean terms to gcs bucket, then logs metadata to help auditing.
  3. Storage: store the cleaned terms in a public bucket or cloud storage with a version stamp; use metadata to track processing status.
  4. Configuration: set application default credentials for authentication; ensure the gcs source is saved in the named location: 将请求正文保存在名为,gcssource,public,格式cloud,target_lang_code,global,gscloud-samples-datatranslationglossarycsv,authorization,us-central1,进行身份验证请设置应用默认凭证, utf-8,translation,requestjson,running,metadata,languagecodesset,inputuri,async,rest.
  5. Monitoring: observe running jobs in real time, expose a status endpoint, and provide a health check for the glossary ingestion pipeline.

Node.js: Create Glossary Files and Reuse Across Projects

Implement a lightweight Node.js CLI to generate a glossary bundle and reuse it across projects. Create a glossary.json with fields glossary_id, glossaryname, languagecodesset, languages, from, location, operation, metadata, requests, and glossaryinputuri. Use a consistent schema so each project can read the same file without changes.

Store the request payload in a known place: 将请求正文保存在名为 glossary_request.json 的文件中,以便 pipeline 读取。 Include fields such as requestjson and applicationjson, and capture submittime to record when the bundle was created. Ensure the payload is complete and ready for running processes to consume.

When the CLI finishes, it returns a result object with fields: client, glossary_id, glossaryname, glossaryinputuri, metadata, and global. The response should also include location and from so downstream jobs can locate the glossary. 您应该收到类似以下内容的结果结构:包含 glossary_id、glossaryname、result、operation、requests、languagecodesset。

Этапы реализации

Install Node.js and initialize a small project. Use fs to write glossary.json and create a glossary_input directory. Build a function that validates languagecodesset against supported codes and collects terms into languages. Ensure the CLI outputs a running status and writes glossaryinputuri for access by other projects. Include submittime to timestamp the emission for auditing.

In code, read input via process.stdin or prompts, then assemble a JSON object with glossary_id, glossaryname, languages, languagecodesset, from, location, operation, and metadata. Write to glossaryinputuri and emit a running status to the console. Use requestjson and applicationjson as content types to keep payloads clear and portable.

Reuse and distribution

Publish the glossary bundle to a shared location or a monorepo. Point projects to the same glossaryinputuri and reuse languagecodesset and languages across apps. Use a script to copy glossary.json into each project, or create a symlink to the glossary folder. For workflows, pass the location via from and operation and fetch the glossary via API or local file. cli或者使用了 any runner can load the same glossary.json and apply it to new projects.

Java: Create and Use Glossaries for Localization

Загружать глоссарий из glossaryinputuri при запуске и повторно использовать его для всех запросов перевода.

Организуйте термины в простой формат и группируйте по `languagecodesset`, используя `gcssource` для идентификации источника глоссария. Сохраняйте файл компактным, с колонками, такими как термин, перевод и заметки, чтобы упростить обслуживание.

В Java инициализируйте translationserviceclient и выполните REST-поток для создания глоссария: отправьте POST-запрос к конечной точке glossaries с телом, включающим glossaryinputuri, gcssource и languagecodesset. Захватите результирующую операцию и извлеките glossary-id для последующих вызовов.

Обратитесь к созданному глоссарию по пути к ресурсу project_number_or_idlocationsus-central1glossariesglossary-id и сохраните его вместе с вашими рабочими процессами перевода. Это сохраняет стабильность отображения при масштабировании локализации на различные языки.

При переводе присоединяйте глоссарий в запросах через REST, включая glossary-id. Клиент службы перевода обрабатывает подключение запроса, и вы получаете обновленный текст вместе с метаданными в ответе, включая примеры деталей и счетчики запросов (requests).

Вы должны увидеть поток ответов, включающий поля submittime и post, подтверждающие, что глоссарий был применен к переводу. Вы должны получить похоюю на следующую sample payload ответа, демонстрирующую связь с глоссарием и результаты перевода.

Контролируйте производительность, отслеживая состояние операций, проверяя целостность gcssource и тестируя небольшой выборкой перед более широким распространением. Обновляйте глоссарий постепенно и публикуйте новые версии с уникальными значениями glossary-id, чтобы избежать конфликтов, а затем откатите изменения, если это необходимо.

Python: Создание и использование глоссариев (продвинутый уровень)

Обзор

Используйте Python для создания глоссариев в Translation API, инициализируйте клиент в us-central1 и опубликуйте общедоступный глоссарий для глобального использования. Подход использует асинхронную операцию, возвращающую отдельную управляющую ссылку, которую вы можете контролировать через submittime и обновлять результаты.

Workflow and Details

Определите glossaryname, укажите языки и установите target_lang_code для переводов. Используйте метаданные для описания записей, а init для подготовки ресурса. Полный путь к ресурсу выглядит следующим образом: project_number_or_idlocationsus-central1glossariesglossary-id, обеспечивая согласованное расположение и идентификатор. Опция CLI cli您可以运行 позволяет быстро выполнить первоначальную настройку, а затем отправить определение глоссария в API с асинхронной обработкой. После отправки сохраните тело запроса в файл с именем,result, чтобы получить ответ API, включая сведения об операции и glossary-id для последующего повторного использования. Используйте us-central1 в качестве региона и public с глобальной видимостью, чтобы обеспечить доступ в разных локациях.

FieldUsageExample
glossarynameОтображаемое имя для ресурса глоссарияmy_tech_terms
languagesЯзыки-источники или поддерживаемые языки для записей["en","fr","de"]
Translation not available or invalid.Основной код языка переводаfr
publicУровень доступа; истинное раскрытие публичноtrue
us-central1Региональное расположение для глоссарияus-central1
project_number_or_idlocationsus-central1glossariesglossary-idПуть к ресурсу для глоссарияprojects/12345/locations/us-central1/glossaries/glossary-id
metadataМетаданные глоссария, включая описание и термины{"description":"Advanced glossary for tech terms"}
initФлаг инициализации для настройки глоссарияtrue
submittimeВременная метка подачи2025-09-21T12:34:56Z
operationДескриптор асинхронной операции, возвращенный APIoperations/abcdef
asyncУказывает на асинхронную обработкуtrue
postHTTP метод, используемый для создания глоссарияPOST
resultОтвет API сохранен для последующего использованияresult
glossary-idУникальный идентификатор в коллекции глоссарияglossary-id
globalГлобальная область видимостиtrue

Go: Реализовать рабочие процессы глоссария для обеспечения согласованности

Реализуйте централизованный репозиторий глоссария и обеспечьте автоматизированный импорт для поддержания единообразия перевода между проектами.

Глоссарий: Основные принципы выравнивания

Шаблоны автоматизации для обеспечения единообразия

  1. Используйте powershell для организации шагов входа, сборки и импорта; создайте сценарий, который вызывает REST API, обрабатывает постраничную навигацию и повторные попытки при сбоях.

  2. В Go реализуйте небольшой модуль, который предоставляет клиент translationserviceclient и метод importGlossary, который принимает набор языков и glossaryinputuri.

  3. Сделайте рабочий процесс без состояния между запусками и сохраняйте состояние во временном хранилище, связанном с именем файла глоссария, чтобы избежать конфликтующих обновлений.

  4. Проверять при импорте, сравнивая код состояния ответа rest.status с ожидаемым кодом успеха и перепроверяя множество languagecodes с языками-источниками.

  5. Захватите полезную нагрузку ответа и сохраните полное тело запроса там, где это уместно; сохраните тело запроса в файле glossary-requests.json, а затем проверьте содержимое с помощью вызова rest.