API documentation is bilingual in a special sense even before translation begins: it contains human language and machine contracts side by side. Descriptions, tutorials and error explanations are prose; endpoints, HTTP methods, parameter names, schema keys, enum values, code samples and SDK symbols may be executable or contractually stable.
Searches for API documentation localization, SDK documentation translation, translate developer documentation, OpenAPI localization, localize API docs, multilingual developer docs, translate code examples and developer documentation internationalization describe a job where fluent prose is not enough. The OpenAPI Specification 3.2.0, published 19 September 2025, defines a language-agnostic description for HTTP APIs, including paths, operations, parameters, schemas, examples and external documentation.
This guide explains how to localize developer documentation without turning documentation into a different API. It covers OpenAPI descriptions, operation summaries, endpoint paths, parameters, headers, schemas, enum values, request and response examples, error codes, SDK classes and methods, code comments, generated documentation, versioning, deprecations, language tags, search, copy/paste testing and the rule that every localized code sample should still describe or call the same interface.
This article sits inside eduKateSG’s Master Art of Translation architecture. It extends the professional localization layer without replacing existing owners for Unicode, software localization, search, security, accessibility or developer tooling.
Quick answer
Freeze the machine contract first. Translate descriptions, conceptual guides, explanatory tables and selected comments, while protecting endpoints, HTTP methods, parameter keys, schema property names, enum tokens, code identifiers and version numbers unless the API explicitly defines localized values. Generate as much documentation as possible from one versioned source of truth and test localized examples against the actual API or SDK.
- Classify: distinguish human prose from protocol and code.
- Source: keep API description and docs tied to one versioned contract.
- Protect: endpoints, methods, parameter keys, schema names and symbols.
- Translate: summaries, descriptions, tutorials and recovery guidance.
- Example: localize user-facing sample data only when the schema permits it.
- Version: preserve deprecation and release meaning exactly.
- Verify: run or validate localized examples against the real interface.
1. Use the API contract as the source of truth
Developer documentation should describe a specific API version and schema. OpenAPI exists so humans and computers can understand a service from one interface description.
Professional method. Bind localized documentation to the same versioned OpenAPI or equivalent contract used for source-language docs. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The localized guide is translated from an old PDF after endpoints have changed. A translated operation description can be regenerated when the source OpenAPI document changes.
Verification. Compare endpoint, parameter and response definitions against the release contract. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
2. Protect endpoint paths
Paths are part of the callable interface. Translating /users/{id}/orders into target-language words creates a different route unless the service explicitly supports it.
Professional method. Lock literal path segments and path-template parameter names. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A translator localizes /search to a target-language word in a code block. The prose can say ‘Search endpoint’ while the path remains /search.
Verification. Send the documented request to the actual service. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
3. Protect HTTP methods
GET, POST, PUT, PATCH and DELETE are protocol tokens. They are not verbs to translate in code examples.
Professional method. Keep method tokens exact and translate their explanation separately. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. DELETE is translated as a target-language imperative in a request line. A table can describe DELETE as ‘removes the resource’ in the target language.
Verification. Copy/paste the example into an HTTP client. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
4. Keep parameter names stable
Query, path, header and body parameter names form part of the API contract. Changing them breaks requests.
Professional method. Protect identifiers while translating descriptions and human-readable examples. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The query key page_size becomes a translated phrase. The documentation can say what page_size means without changing the key.
Verification. Run examples from the localized page. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
5. Protect header names and protocol values
Headers such as Authorization and Content-Type have standardized or API-defined identity. Literal translation can make examples invalid.
Professional method. Lock header field names and fixed values; translate explanations around them. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A localized example sends a translated Authorization header. The note describing Bearer tokens can be target-language prose while the syntax remains exact.
Verification. Validate requests through the real gateway. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
6. Treat schema property names as data-contract identifiers
JSON and other payload keys are often case-sensitive. Translating them changes serialization.
Professional method. Protect property names unless the API contract explicitly accepts localized keys. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. customer_name is translated inside JSON while the server still expects customer_name. Sample values may be localized, but the property key remains fixed.
Verification. Validate the sample against the schema. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
7. Do not translate enum tokens unless the schema says to
Enum values can be machine tokens even when they look like English words. ‘pending’, ‘approved’ or ‘cancelled’ may be exact accepted values.
Professional method. Protect enum literals and translate their descriptions separately. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A developer copies a localized enum token and receives a validation error. The docs can display pending — ‘awaiting review’ with target-language explanation.
Verification. Submit every documented enum example. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
8. Translate operation summaries and descriptions
OpenAPI’s summary and description fields are human-facing documentation. These are good localization targets when they are kept tied to the same operation ID and path.
Professional method. Extract or transform narrative fields while preserving structural keys. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The translated summary drifts into a claim about behavior the API does not guarantee. An operation can be described naturally in Japanese while operationId remains createInvoice.
Verification. A developer can predict the actual call behavior from the target description. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
9. Keep operation IDs stable
operationId is often used by tooling and code generators. Changing it can alter generated SDK method names or references.
Professional method. Treat it as a protected developer identifier. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The localized OpenAPI file translates operationId values. createInvoice remains the operation ID even if the visible heading is translated.
Verification. Regenerate SDKs and compare public symbols. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
10. Localize example data selectively
Examples contain both schema structure and user-facing values. A name, address or prose field can benefit from localization while IDs, keys and contract values must remain stable.
Professional method. Classify each sample field by semantic type before localizing values. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A UUID or enum is changed for cultural realism. A sample customer name can use the target script while id and status token remain valid.
Verification. Validate the full example against the current schema. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
11. Keep example meaning equivalent across locales
Localized examples should teach the same concept. Changing values too much can make one locale demonstrate a different edge case.
Professional method. Use parallel examples unless a locale-specific example materially improves understanding. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The source shows a successful response while the translation replaces it with a failure example. Currency or address values can localize while the response shape and lesson stay equivalent.
Verification. Compare what each locale’s example is intended to teach. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
12. Run code samples, do not merely proofread them
Code can look plausible while failing because of a changed quote, identifier or string. Localization adds another opportunity for accidental edits.
Professional method. Extract and execute code samples in automated tests where feasible. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A typographic quote enters a curl command during translation. A localized Python tutorial can translate comments but still run the same SDK call.
Verification. CI compiles or executes sample snippets against mocks or test services. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
13. Translate code comments only when they are pedagogical prose
Comments can help learners but may also contain exact instructions or markers. Not every comment is harmless to change.
Professional method. Distinguish explanatory comments from directives, doctest markers or generated annotations. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A translator changes a special comment consumed by tooling. A simple ‘# Create the client’ comment can localize while ‘# noqa’ remains protected.
Verification. Run linters/tests on localized samples. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
14. Protect SDK class and method names
SDK symbols are code identifiers. Translated names will not exist in the installed library.
Professional method. Lock namespaces, classes, functions, properties and package names; translate conceptual headings and surrounding explanation. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The docs tell users to call a translated method name. client.createInvoice() stays exact while the paragraph describing it localizes.
Verification. Run the code with the documented SDK version. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
15. Version documentation with SDK releases
SDK methods and signatures change over time. A fluent old translation can be more dangerous than missing documentation.
Professional method. Tie locale content to version branches, tags or generated doc versions. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The Japanese page documents v3 while code snippets target v2. A version selector can keep language and SDK version as separate dimensions.
Verification. Check package version and method signature on every localized page. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
16. Preserve deprecation meaning exactly
Deprecated does not always mean removed, unsupported or unsafe. These lifecycle terms carry precise migration implications.
Professional method. Translate status labels through a controlled glossary and preserve dates/replacement guidance. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. The target says ‘obsolete’ when the source says ‘deprecated but supported’. A replacement endpoint can be linked without claiming the old endpoint has stopped working.
Verification. Compare status against release notes and API contract. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
17. Keep error codes stable while localizing explanations
Error identifiers are often machine-readable support keys. Translating them breaks search, support and automation.
Professional method. Preserve codes and map each to localized meaning and recovery guidance. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. INVALID_TOKEN becomes a target-language string in a response table. The heading can show INVALID_TOKEN followed by a natural-language explanation.
Verification. Trigger representative errors and compare actual code. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
18. Localize language negotiation and locale examples accurately
APIs can accept or return language tags. BCP 47 identifiers such as en-SG or zh-Hant are technical language metadata, not labels to translate.
Professional method. Protect language tags and translate the description of what they represent. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A translator rewrites en-US into an ordinary language name inside a request example. The docs can explain Accept-Language behavior while keeping tags exact.
Verification. Run content-negotiation examples against the service. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
19. Generate docs from structured sources where possible
Manual copies multiply drift. One API description can feed reference docs, code generators and localized narrative fields.
Professional method. Keep structural contract fields centralized and localize only documented human-facing fields or surrounding guides. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. Each locale maintains an independent hand-edited endpoint table. OpenAPI reference can be generated per version while narrative tutorials are translated separately.
Verification. Diff localized reference structure against the source contract. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
20. Make search bilingual without translating code identifiers
Developers search both concepts and exact symbols. If search indexes only translated prose, users may not find createInvoice or INVALID_TOKEN.
Professional method. Combine target-language search terms with invariant API/SDK symbols, using the principles from multilingual search and collation. The decision should be explicit enough that a second translator, reviewer, developer or moderator can reproduce it without inventing a new rule.
Failure mode. A user searches the exact method name and the localized docs return nothing. The page can index ‘create invoice’ in target language plus createInvoice and POST /invoices.
Verification. Run searches using both natural language and exact developer tokens. If the check exposes uncertainty, preserve the original evidence and escalate rather than forcing a confident-looking localized answer.
A repeatable operating sequence
API documentation localization should preserve one executable interface while making its explanation accessible in more languages.
- Bind docs to a specific OpenAPI/API/SDK version.
- Classify protocol tokens, code identifiers and human prose.
- Protect paths, methods, parameters, headers, schemas, enums and symbols.
- Translate summaries, descriptions, tutorials and recovery guidance.
- Localize sample values only when schema-safe.
- Validate examples against schemas.
- Compile or run code samples.
- Preserve deprecation and version semantics.
- Keep error codes and language tags exact.
- Generate reference docs from structured sources where possible.
- Index both target-language concepts and invariant symbols.
- Regression-test after API or SDK releases.
Treat the sequence as a loop. Late defects often reveal an earlier mistake in identity, data modelling, context, policy, spatial design or version control. Repairing the earliest useful cause is more durable than patching one translated string.
Worked scenarios
1. Endpoint path translated in a guide
The localized tutorial shows /usuarios instead of /users. The hidden risk is prose translation changing the callable API.
Restore the literal endpoint, translate the surrounding explanation and execute the request as a test. The objective is to preserve the same underlying technical, spatial, safety or policy state while allowing the target language to become natural and usable.
2. Enum value localized
The schema accepts status=’pending’ but the translated example uses a target-language word. The hidden risk is copy/paste failure disguised as readable documentation.
Keep the token pending and localize its human explanation. The objective is to preserve the same underlying technical, spatial, safety or policy state while allowing the target language to become natural and usable.
3. SDK method renamed in translation
A visible heading and code sample both translate createInvoice(). The hidden risk is localized docs describing a nonexistent method.
Protect the method identifier and translate only the heading’s descriptive phrase. The objective is to preserve the same underlying technical, spatial, safety or policy state while allowing the target language to become natural and usable.
4. Old locale page survives API version change
The English docs update a required parameter but the target translation does not. The hidden risk is fluent stale documentation causing production bugs.
Bind translation state to API version and block publishing stale localized reference docs. The objective is to preserve the same underlying technical, spatial, safety or policy state while allowing the target language to become natural and usable.
5. Localized example uses invalid address data
The translator changes a sample to be culturally familiar but violates the schema. The hidden risk is localized realism breaking technical validity.
Choose target-locale sample values that still satisfy all schema constraints and validate them automatically. The objective is to preserve the same underlying technical, spatial, safety or policy state while allowing the target language to become natural and usable.
6. Search cannot find an exact error code
The code appears only inside non-indexed code blocks. The hidden risk is localization search optimizing for prose but hurting debugging.
Index stable symbols alongside translated concepts and verify exact-token search. The objective is to preserve the same underlying technical, spatial, safety or policy state while allowing the target language to become natural and usable.
API and SDK documentation localization: twenty professional practice cases
For each case, identify the invariant, the localizable layer, the evidence required, the safest provisional action and the final verification step.
1. A path parameter is named {userId}
Protect the parameter name and translate only its explanation. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
2. A request example contains a person’s name
Localize the sample value if useful, but keep JSON keys and schema-valid structure unchanged. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
3. An HTTP header is shown in a table
Keep the header name exact and translate the description. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
4. An enum contains ACTIVE and INACTIVE
Protect tokens unless the API contract explicitly defines localized values. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
5. A code comment says ‘Retry after 5 seconds’
Translate it if pedagogical, while preserving the numeric behavior and code around it. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
6. An SDK package is called requests
Do not translate the package name. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
7. A deprecated method still works
Translate deprecation status precisely without claiming removal. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
8. The docs support en-US and fr-FR examples
Keep BCP 47 tags exact and explain them in the target language. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
9. A curl example contains a bearer token placeholder
Protect Authorization syntax and clearly mark the placeholder as an example secret. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
10. A JSON example includes user-visible message text
Localize the value only if the API actually allows that value to be target-language content. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
11. The API returns error code 403
Keep the numeric status and translate the recovery explanation. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
12. A query parameter is optional
Preserve required/optional semantics exactly. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
13. A table heading says ‘Type’
Translate the heading while leaving data-type tokens like string or integer according to the documentation convention. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
14. The SDK exposes create_invoice in Python and createInvoice in JavaScript
Protect each language’s actual symbol and localize the conceptual explanation. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
15. A schema field has format: uuid
Keep the format token exact. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
16. A locale page links to the wrong SDK version
Fix the version route, not the translation wording. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
17. A sample address uses characters outside ASCII
Validate that the API and SDK handle Unicode rather than replacing the data with English. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
18. Generated reference docs contain untranslated descriptions
Localize only supported narrative fields without hand-editing generated structural sections. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
19. An API call in a tutorial no longer exists
Update source/version ownership first, then retranslate the current tutorial. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
20. A developer searches a translated concept term
Ensure search maps target-language concept vocabulary to the same endpoint and symbols. State why the rule applies and what new evidence would make you change the decision. This keeps judgment accountable.
Then apply the same principle to a second locale, script, device, platform or version. A sound localization rule should survive changed conditions.
Release checklist
- Localized docs are bound to the correct API/SDK version.
- Endpoints and HTTP methods remain exact.
- Parameter, header and schema identifiers are protected.
- Enum and error-code tokens are not translated accidentally.
- Operation IDs and SDK symbols stay stable.
- Human summaries and descriptions are natural target-language prose.
- Example values are localized only when schema-safe.
- Code snippets compile or run.
- Deprecation meaning remains exact.
- BCP 47 language tags remain technical identifiers.
- Search finds both target-language concepts and code symbols.
- Generated reference structure remains synchronized with source contract.
Frequently asked questions
Should API endpoints be translated?
No, not unless the service explicitly exposes different localized routes. Endpoints are normally part of the machine interface. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
Can OpenAPI descriptions be localized?
Yes. Human-facing summary and description fields are natural localization targets while structural fields remain stable. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
Should JSON keys be translated in examples?
No when they represent actual schema property names. You can localize user-facing values if the schema permits it. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
Can enum values be translated?
Only if the API contract explicitly defines localized values. Otherwise keep machine tokens exact and translate their explanation. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
What is the current OpenAPI Specification version?
The latest published specification is OpenAPI 3.2.0, dated 19 September 2025. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
What about SDK method names?
Protect the actual package, class, method and property identifiers; translate the conceptual explanation around them. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
How do you stop localized docs becoming stale?
Bind them to API/SDK versions, generate reference material from structured sources and reopen translation when the contract changes. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
What proves the localization is technically correct?
The examples validate, compile or run against the intended API/SDK version while the target-language explanations remain accurate. In professional localization, the strongest answer keeps the invariant system fact separate from the language layer that can legitimately vary.
Selected references and next routes
- OpenAPI Specification 3.2.0
- IETF BCP 47: Tags for Identifying Languages and Matching
- eduKateSG: Localize Command-Line Interfaces and Developer Tools
- eduKateSG: Reliable Localization APIs and Webhooks
Conclusion
Developer documentation must translate human understanding without translating the interface the software actually exposes. That boundary is the entire craft.
When endpoints, schemas, symbols and version semantics remain fixed while explanations and examples become genuinely accessible, multilingual API documentation can serve global developers without creating a shadow API that exists only on the page.
