Skip to content

docs: glossaries without source_lang on /v2/translate - #478

Merged
kabraham13 merged 2 commits into
mainfrom
docs/glossary-without-source-lang
Oct 28, 2026
Merged

kabraham13 merged 2 commits into
mainfrom
docs/glossary-without-source-lang

Conversation

@kabraham13

Copy link
Copy Markdown
Contributor

Summary

POST /v2/translate accepts glossary_id or glossary_ids without source_lang. DeepL detects the source language and applies the glossary's dictionary for the detected language pair. This PR removes the wording that says glossaries can't be used with source language detection and documents the new behavior.

Document translation (POST /v2/document) still requires source_lang with a glossary, and the official client libraries still require it client-side, so the docs say so.

Changes

  • docs/customize/managing-glossaries.mdx: new section "Use a glossary without a source language" with a request and response, the 400 when the detected pair has no dictionary, short-text detection, and using one multilingual glossary. The intro to "Use a glossary in a translation" now says source_lang is required for /v2/document and optional for /v2/translate.
  • api-reference/openapi.yaml (and the generated openapi.json): update the glossary_id and glossary_ids descriptions on /v2/translate, the Glossaries tag description, and the /v2/document glossary_id description (documents the 400 when source_lang is omitted).
  • docs/best-practices/document-translations.mdx, docs/customize/glossaries-in-the-real-world.mdx: align wording (the tutorial example uses the Python SDK, so it now says "with the SDKs").
  • docs/resources/roadmap-and-release-notes.mdx: October 28 changelog entry.

Verification

Checked against the live API:

  • glossary_id and glossary_ids without source_lang return 200 and apply the glossary.
  • A multilingual glossary applies the dictionary that matches the detected language.
  • A glossary without a dictionary for the detected pair returns 400 (No dictionary found for language pair ...), also for glossary_ids when any listed glossary lacks it.
  • An explicit source_lang that doesn't match the glossary returns the same 400.
  • Very short input can be detected as the wrong language and fail the same way.
  • POST /v2/document with glossary_id and no source_lang returns 400.

The example response in the new section is real output.

Not run: mint broken-links --check-anchors (mint isn't installed here). The new anchor is #use-a-glossary-without-a-source-language, referenced from the changelog, the document translation page and the glossary page itself.

🤖 Generated with Claude Code

Text translation accepts glossary_id or glossary_ids without source_lang.
DeepL detects the source language and applies the glossary's dictionary
for the detected language pair. Document translation still requires
source_lang with a glossary.

- managing-glossaries: new "Use a glossary without a source language"
  section with a request and response, the 400 when the detected pair
  has no dictionary, short-text detection, and using one multilingual
  glossary
- openapi.yaml: update glossary_id and glossary_ids on /v2/translate and
  the Glossaries tag description; document the 400 for a missing
  source_lang on the /v2/document glossary_id
- document-translations, glossaries-in-the-real-world: align wording
- changelog: October 28 entry
- openapi.json regenerated from the YAML

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
deepl-c950b784 🟢 Ready View Preview Oct 28, 2026, 4:14 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

- managing-glossaries: rename the section to "Use a glossary with
  automatic source language detection", state the REST-only, client
  library and document limits up front instead of in a trailing note,
  and turn the caveats into a troubleshooting list
- state the example's assumption about the glossary entry so it no
  longer conflicts with the earlier example on the page
- openapi.yaml: describe the glossary_id requirement as a dictionary for
  the language pair of the request (correct for multilingual glossaries),
  scope the Glossaries tag sentence to documents with a glossary, and
  document the 400 for glossary_ids on /v2/document
- changelog: trim the entry to three bullets and link to the guide
- update the anchor in the document translation and changelog links
- openapi.json regenerated from the YAML

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kabraham13
kabraham13 merged commit 2225892 into main Oct 28, 2026
3 checks passed
@kabraham13
kabraham13 deleted the docs/glossary-without-source-lang branch October 28, 2026 17:52

This branch was successfully deployed

1 active deployment
staging — 393256fd Deployed Oct 28, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants