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
- Normalize every input: trim, collapse spaces, enforce utf-8, and apply languagecodesset to match target_lang_code.
- Block terms containing control characters or mixed scripts; map to canonical forms via a translation step.
- Limit term length and remove duplicates to prevent bloating the glossary and the downstream csv (gscloud-samples-datatranslationglossarycsv).
- Require authorization for all calls; enforce a signed token in the Authorization header and verify us-central1 region policy.
- Return precise feedback for invalid terms, including which item failed and why, so editors can adjust quickly.
Implementation details
- 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.
- Data flow: client sends terms; server validates, sanitizes, and writes clean terms to gcs bucket, then logs metadata to help auditing.
- Storage: store the cleaned terms in a public bucket or cloud storage with a version stamp; use metadata to track processing status.
- 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.
- 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。
Fasi di implementazione
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
Carica il glossario da glossaryinputuri all'avvio e riutilizzalo per tutte le richieste di traduzione.
Organizzare i termini in un formato semplice e raggruppare per languagecodesset, utilizzando gcssource per identificare la fonte del glossario. Mantenere il file conciso, con colonne come termine, traduzione e note per semplificare la manutenzione.
In Java, inizializza un Translationserviceclient e esegui un flusso REST per creare il glossario: invia una richiesta POST all'endpoint glossaries con un corpo che include glossaryinputuri, gcssource e languagecodesset. Cattura l'operazione risultante ed estrai il glossary-id per chiamate future.
Fare riferimento al glossario creato con il percorso di risorse project_number_or_idlocationsus-central1glossariesglossary-id e archiviarlo insieme ai flussi di lavoro di traduzione. Questo mantiene la mappatura stabile man mano che si scalano le localizzazioni in lingue diverse.
Quando traduci, allega il glossario nelle richieste tramite rest includendo il glossary-id. Il translationserviceclient gestisce il cablaggio della richiesta e ricevi testo aggiornato insieme ai metadati nella risposta, inclusi dettagli campione e conteggi di richieste (requests).
Dovresti vedere uno stream di risposta che include i campi submittime e post, confermando che il glossario è stato applicato alla traduzione. Dovresti ricevere un payload di risposta campione simile a questo che mostra il collegamento al glossario e le traduzioni risultanti.
Monitora le prestazioni tracciando lo stato operativo, convalidando l'integrità di gcssource e testando con un piccolo campione prima della diffusione più ampia. Mantieni gli aggiornamenti del glossario incrementali e pubblica nuove versioni con valori univoci di glossary-id per evitare conflitti, quindi esegui il rollback se necessario.
Python: Crea e Utilizza Glossari (Avanzato)
Panoramica
Utilizza Python per creare glossari nell'API di traduzione, inizializza il client in us-central1 e pubblica un glossario pubblico per un utilizzo globale. L'approccio utilizza un'operazione asincrona, restituendo un handle di operazione distinto che puoi monitorare tramite submittime e pubblicare aggiornamenti al risultato.
Flusso di lavoro e dettagli
Definisci glossaryname, specifica le lingue e imposta target_lang_code per le traduzioni. Usa i metadati per descrivere le voci e init per preparare la risorsa. Il percorso completo della risorsa appare come project_number_or_idlocationsus-central1glossariesglossary-id, garantendo una posizione e un identificativo coerenti. L'opzione CLI cli您可以运行 ti permette di eseguire rapidamente la configurazione iniziale, quindi invia la definizione del glossario all'API con elaborazione asincrona. Dopo l'invio, 将请求正文保存在名为,result per catturare la risposta dell'API, inclusi i dettagli dell'operazione e il glossary-id per un riutilizzo successivo. Usa us-central1 come regione e public con visibilità globale per abilitare l'accesso tra le posizioni.
| Field | Usage | Example |
|---|---|---|
| glossaryname | Nome visualizzato per la risorsa del glossario | my_tech_terms |
| languages | Lingue di origine o supportate per le voci | ["en","fr","de"] |
| target_lang_code | Lingua di traduzione primaria | fr |
| public | Livello di accesso; vero espone pubblicamente | true |
| us-central1 | Posizione regionale per il glossario | us-central1 |
| project_number_or_idlocationsus-central1glossariesglossary-id | Percorso della risorsa per il glossario | projects/12345/locations/us-central1/glossaries/glossary-id |
| metadata | Metadati del glossario, inclusa descrizione e termini | {"description":"Advanced glossary for tech terms"} |
| init | Flag di inizializzazione per la configurazione del glossario. | true |
| submittime | Timestamp della presentazione | 2025-09-21T12:34:56Z |
| operation | Handle dell'operazione asincrona restituita dall'API | operations/abcdef |
| async | Indica elaborazione asincrona | true |
| post | Metodo HTTP utilizzato per creare il glossario | POST |
| result | Risposta API salvata per un uso successivo. | result |
| glossary-id | Identificatore univoco nella collezione del glossario | glossary-id |
| global | Ambito di visibilità globale | true |
Go: Implementare Workflow del Glossario per la Coerenza
Implementare un repository centralizzato di glossario e applicare importazioni automatizzate per mantenere la coerenza tra le lingue in tutti i progetti.
Glossary Alignment Essentials
Definisci una singola fonte di verità nel cloud di formati e pubblica termini in un glossario strutturato; includi campi per termine, traduzione e languagecodesset.
Costruisci un flusso di lavoro che utilizzi translationserviceclient per recuperare i termini per le lingue al momento della compilazione, garantendo che ogni client utilizzi lo stesso glossario.
Salvare la posizione di input del glossario come glossaryinputuri e farvi riferimento dalle richieste di traduzione per evitare derive.
Conserva le credenziali in cred e richiedi una fase di accesso prima di qualsiasi importazione o chiamata REST.
Prepara un nomefile-glossario per il glossario primario e usa gscloud-samples-datatranslationglossarycsv come campione canonico per la convalida.
Importa tramite rest con un payload che include languagecodesset, glossaryterms e glossarydefinitions; Salva il corpo della richiesta in un file denominato glossary-requests.json per la tracciabilità.
Dovresti ricevere qualcosa di simile a quanto segue, che conferma l'importazione del glossario avvenuta con successo, inclusi un nome-file-glossario e un campo di stato.
Pattern di automazione per la coerenza
Usa Powershell per orchestrare i passaggi di accesso, build e importazione; crea uno script che chiama l'API REST, gestisce la paginazione e riprova in caso di errori.
In Go, implementa un piccolo modulo che espone un client chiamato translationserviceclient e un metodo importGlossary che accetta un set di lingue e un glossaryinputuri.
Mantenere il workflow stateless tra le esecuzioni e archiviare lo stato in uno storage a breve termine associato al nome del glossario per evitare aggiornamenti in conflitto.
Convalida all'importazione confrontando rest.status della risposta con il codice di successo previsto e verificando la corrispondenza dell'insieme languagecodesset con le lingue di origine.
Acquisisci il payload di risposta e memorizza l'intero corpo della richiesta ove appropriato; salva il corpo della richiesta in un file denominato glossary-requests.json, quindi verifica il contenuto con una chiamata rest.




