VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Translate Like a Pro | 8550 — Python jsonargparse Localization, Config Files, Environment Variables, Typed Help and Multilingual QA

Python jsonargparse localization is not merely a matter of replacing argparse help strings. Configuration files, environment variables, type-hinted parameters and nested namespaces turn ordinary labels into an executable contract. This practical Python jsonargparse localization guide explains how to translate command-line help, configuration guidance and error recovery without altering the program’s grammar. It focuses on real search needs: making Python jsonargparse help understandable, avoiding translated flags that fail, and checking multilingual command-line releases systematically.

A colleague in Nairobi configures a workflow using a YAML file, another in Helsinki sets environment variables, and a third in São Paulo follows CLI help before exporting a table. They share a versioned pipeline but do not share a first language. The recurring problem is the boundary between what a person should understand and what software must recognize. A translation may look elegant while copying its examples produces a rejected option, a wrong path or an unintended side effect. We will use FieldAtlas, a fictional tool for processing regional climate observation files as a fictional, concrete teaching case and keep every implementation decision tied to a test.

You will learn how jsonargparse’s ArgumentParser, auto_cli and auto_parser, config-action support, namespaced arguments, type validation, optional docstring extraction and environment parsing affect localization, which texts may safely vary, how to review error paths, what to test in multilingual terminals and how to prepare a release that remains compatible with automation. The guide has a quick answer, a carefully separated code example, progressive technical chapters, diagnostic investigations, a language and platform test plan, frequently asked questions and practical next steps. Its scope is Python jsonargparse, not general language theory or unrelated translation software.

Quick answer: translate the explanation without silently changing the command

  • Treat every copyable command as a test case rather than as prose.
  • Write for a reader who has never learned the original English help text.
  • Protect parser identifiers, flag spellings, subcommand tokens and returned data keys.
  • Translate descriptions, warnings, prompts and recovery guidance when the application controls them.
  • Use genuine samples that readers can execute in a safe test folder.
  • Test a successful path, help, an invalid invocation and Unicode filenames.
  • Measure terminal formatting at narrow widths and check screen-reader readability.
  • Document the installed package version and release limitations.

For FieldAtlas, a fictional tool for processing regional climate observation files, a useful early test is not whether every sentence is fluent. Ask a reader to choose an operation, predict what files it will affect, copy the published command, and explain what the result means. Compare that observed behavior with an English-language control run of the same binary. Only then refine rhythm, terminology and tone.

Chapter 1 — First principles: a multilingual CLI has two simultaneous readers

Unlike a plain help-only CLI, jsonargparse can load nested settings from configuration sources. Human-readable documentation and machine-consumed configuration keys therefore need different translation policies. A human sees lines on a screen and makes choices based on them. A program consumes tokens, types, state and paths. If one sentence describes an option incorrectly, the human can select a command that the parser never intended. That is why translation quality includes practical software validation, not just bilingual review. In a world-facing product, the same error can be magnified by automated documentation, tutorials and copied snippets.

Keep recognized option names, dotted namespace keys, config object keys, environment variable names, type names and file formats stable; translate explanations, comments outside parsed schemas, onboarding guidance and deliberately controlled errors. The most important design decision is to write down the boundary before extracting the first phrase. An argument called –config is not the English word "configuration" merely because it resembles one; its leading dashes make it a named input that scripts may depend on. A descriptive phrase such as "load a configuration file" can be translated freely, because it explains the token rather than constituting it.

Use a four-column inventory: visible source text, purpose, whether it is parser-significant, and the owner of the change. Classify headings, commands, values, errors, examples, help output and machine-readable records separately. When a string is both visible and executable, such as a command label, maintainers must consciously choose whether to keep a language-neutral token or introduce aliases with backward compatibility. Neither option is obtained by changing a translation file alone.

For a Python developer maintaining a research or data-processing command-line tool that has readers in several countries, the practical outcome is a clear distinction between readability and compatibility. A localized interface can feel natural even when a command literal remains in English, provided it is presented as an exact token and paired with a useful explanation. The reader should never have to guess which part of an example is something to type and which part is instructional commentary.

Chapter 2 — A small executable example with a strict translation boundary

The following code is an illustrative starting point for the documented public API of Python jsonargparse. Install and lock the actual package version used by your project, then run it on a disposable fixture before adapting it. The example is not a full application and intentionally does not invent built-in locale selection: the surrounding application can choose translated descriptions while preserving the declared inputs.

from jsonargparse import ArgumentParser

parser = ArgumentParser(prog="fieldatlas")
parser.add_argument("--config", action="config")
parser.add_argument("--input", type=str, help="Path to an observation file")
parser.add_argument("--limit", type=int, default=25, help="Maximum records")
cfg = parser.parse_args()
print(cfg.input, cfg.limit)

Notice the difference between the identifiers in the code and the English phrases the person reads. The identifiers have a direct relationship to parsing and downstream code. The English descriptions are candidates for a locale-specific resource. If a user asks for German or Japanese help, it is reasonable to construct equivalent descriptions in that language; it is not reasonable to assume the parser begins recognizing new command names without changing and testing its command declarations.

Capture the chosen parser schema and a redacted sample config; build a separate translated guide keyed to those same arguments; verify equivalent namespaces after command-line, config and environment parsing. The translation layer should be narrow enough to debug. If a parser fails before application code has selected a locale, explain what localization control the application actually has and what remains owned by the dependency. A guide earns trust by naming that limitation rather than pretending that every third-party parser error can be translated with an invented switch.

Chapter 3 — A complete work path: from one source command to a multilingual release

Begin with the installed tool rather than a translated screen mockup. Save a real help transcript, a valid command with a known output, a missing-value case and an unknown-flag case. Create a disposable workspace; then make one locale variant, keeping command definitions identical. A native-language reviewer should know exactly what to type and why, and a developer should be able to prove that the parser and the application’s outputs have not changed unintentionally.

Next, choose a real language fallback policy. A partial translation is common in an early release. Define whether the fallback is English, whether missing resources produce an explicit marker in development, and how defaults behave when no locale is selected. This is an application responsibility unless the dependency specifically documents it. Locale values such as fr-FR and pt-BR identify language preferences; they should not automatically alter internal flag names or configuration keys.

Finally, test your help and examples as one connected product. A screenshot can demonstrate how the text looks, but it cannot show whether a copied command works or a destination file was silently overwritten. For every public tutorial, save the exact command, fixture, expected file diff, expected status and any redacted stderr. That record gives translators, testers and maintainers a shared explanation of what the software actually does.

Chapter 4 — Technical decisions and investigations

The following investigations are grouped as progressive teaching cases. Each starts with something a reader can observe, traces the technical reason, proposes a controlled change and names evidence that would justify release. They are not interchangeable with generic translation advice: each case reflects how Python jsonargparse connects visible guidance to execution.

1. Configuration file path

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A regional analyst invokes –config with a translated YAML walkthrough and assumes the file path is a title rather than a path to open. The parser must read a real file, and a human label can be mistaken for the actual configuration value. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Place the translated description near the command but preserve –config and the original filesystem path in the runnable example. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Run the example with a real sample file containing two fields and compare the parsed namespace with the English baseline. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

2. Nested dotted option

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A tutorial says –data.source becomes –datos.fuente because those words seem more natural in Spanish. A dotted option can map to a nested key consumed by application code; changing it can break downstream access. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Show the original key in code type, followed by a natural-language gloss explaining the concept and its parent-child relationship. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Compare serialized namespaces and search for any downstream code that expects the original nested key. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

3. Environment prefix

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A shell script exports a variable such as ATLAS_DATA__LIMIT while a localized guide silently changes the prefix. Environment-variable identifiers are part of the program’s interface and frequently belong to automated deployments. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Explain the naming convention in the reader’s language and preserve the exact prefix, underscores and case in copyable code. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Launch the same installed build in a clean shell for each locale and assert the chosen value is read from the intended variable. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

4. Source precedence

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: An operator sets a default in a file and overrides it on the command line, but the guide says the file always wins. Incorrectly describing precedence can lead to a report generated with the wrong region, data limit or output location. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Make a table of defaults, config, environment and explicit arguments from the installed release; document the actual observed order. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Use conflicting sentinel values from each source and confirm which value appears after parsing, without assuming an order from another package. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

5. Type validation

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A help translation renders an integer limit as a free-form measurement, encouraging users to type 25 rows instead of 25. Type-hinted parsing validates a value before the application runs; translated units cannot silently become part of its grammar. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Explain the expected type and any unit outside the literal example, and keep an integer-only example in a copyable command. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Test valid integer, invalid text, negative integer when disallowed by domain rules, and a localized explanation of the resulting failure. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

6. Docstring-derived help

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A function’s docstring is used to build CLI help and contains prose that may be extracted only when optional support is installed. Different installations can expose different help detail if signature or docstring extras are omitted. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Pin the required extras, translate only descriptive passages, and inspect the actually generated help rather than a mockup. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Build from a clean lockfile, compare –help before and after localization, and check that option names remain unchanged. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

7. auto_cli functions

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A team applies auto_cli to a new function but writes a manual translated Usage page whose options no longer match the function signature. Automatically generated interfaces are linked to code parameters; old prose can promise nonexistent flags. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Derive the help from the installed function signature and maintain a separate translation key for each user-facing description. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Add a new argument in a test branch and ensure locale review catches the new help entry before release. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

8. Class argument groups

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A modelling application exposes a nested class configuration and translated prose implies the class name is a flexible display label. Class names and import paths can be used to select implementations and are not automatically free text. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Distinguish explanatory class descriptions from fully qualified identifiers and disclose any allowlist or trust restrictions. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Use two valid class configurations and one deliberately invalid class path, verifying failure messages and instantiated types. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

9. Subcommand selection

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: The guide shows a translated subcommand while the parser still recognizes the English command token. Subcommand names can form part of scripts, task documentation and recorded operational procedures. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Retain the working literal token inside commands and localize the sentence that tells the reader when to choose it. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Exercise each subcommand with –help and a minimal valid invocation under the same release. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

10. Boolean settings

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A translated manual says a string value false is equivalent to the Boolean false in a YAML configuration. Quoted strings and Boolean values are not the same data type in every parser or serialization context. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Show canonical syntax for the installed parser, including whether quotation marks are meaningful for a configuration format. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Use true, false, quoted values and omissions; inspect parsed values and type checking, not only apparent success. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

11. List and dictionary values

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A report filter accepts a list of station codes but examples use locale-dependent commas that change serialization. JSON and YAML syntax have precise separators and quoting rules; human punctuation conventions do not override them. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Provide valid examples in the actual accepted format and translate a commentary alongside each one. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Compare ordered list length, dictionary keys and special characters after reading the configuration. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

12. Defaults in help

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A localized help message states the normal default is 100 even though a deployment’s configuration overrides it to 500. Readers need to distinguish code default, deployment setting and their chosen runtime value. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Label each value by its source and show how to inspect the active settings without leaking secrets. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Start with no override and with a controlled override, recording the observed difference. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

13. Relative file paths

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: An example uses ./data/observations.csv and a reviewer translates the directory component as though it were a sentence. Paths are environment-dependent values and may point to real resources; renaming them breaks copy-and-run instructions. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Use an existing sample directory with a stable name and explain where the user must replace the path. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Run from a different working directory and verify the file either resolves or produces a useful path-related error. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

14. Unicode filenames

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A contributor tests only ASCII paths while a user’s source file has Arabic, Japanese or accented characters. Internationalization involves operating-system and filesystem behavior, not just replacing messages in terminal output. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Create representative UTF-8 filenames and keep the example path distinct from quoted UI strings. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Check a successful read and a missing-file error on Windows, macOS and Linux where supported. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

15. Error locality

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A parse error correctly identifies a bad field but its English wrapper is confusing to readers using a translated guide. The library may own part of the error wording while the application controls nearby instructions and remediation. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Capture error classes and observed text; translate app-owned recovery guidance without pretending all library diagnostics are locale-aware. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Introduce one missing required field and one invalid type, then confirm the displayed advice points to the right option. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

16. Help width

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A German translation expands descriptions so option names and explanations wrap into an unreadable block in an 80-column terminal. Automatic help formatters may break lines differently depending on terminal width and multibyte rendering. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Shorten descriptions without removing conditions, and put longer explanation in supplementary documentation. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Capture help at 40, 60, 80 and 120 columns, verifying no option description becomes ambiguous. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

17. Structured output

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A user pipes the CLI’s JSON report into another tool and a translated banner is printed to standard output first. Even a perfectly translated banner can corrupt machine-readable stdout consumed by parsers. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Keep programmatic output clean; send human diagnostics through a deliberate channel or optional verbosity mode. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Pipe JSON into a strict parser and assert no banner, decoration or translated prose precedes the payload. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

18. Secrets in configs

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: Documentation demonstrates API tokens inside a translated configuration file that later appears in logs and screenshots. Localization examples can normalize insecure habits if they suggest real credentials should be pasted or printed. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Use unmistakably fake placeholders and show safer environment or secrets-management boundaries appropriate to the application. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Scan sample configs, print-config output and error logs for credential-shaped strings before publication. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

19. Config printing

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A team teaches –print_config as if it were a complete audit of every runtime influence in every version. Printed configuration may depend on parser options and can include defaults, resolved paths or sensitive fields. Do not judge a proposed localization only in isolation. Follow the value from documentation through shell tokenization, parser validation, application logic and output. A change may be harmless in help and consequential several steps later.

A workable response is specific: Describe exactly what was tested in the installed package and redact sensitive fields in screenshots and support tickets. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

Proof matters more than confidence in the wording. Compare a printed configuration to the actual execution parameters and confirm no secret is exposed. The approval question is whether another person can repeat the task and reach the same result. Document the package version, the command, the selected locale, the file or object that changed, and the reason the output matches the instruction.

20. Tab completion

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: Completion candidates contain file paths and literal subcommand names, but the translated guide promises translated completions. Shell completion is a distinct layer that may use shtab or argcomplete support and needs its own contract. A controlled fixture removes guesswork. Choose values that make success, rejection and accidental modification easy to distinguish. This is especially important for tools that operate on files, publish reports or modify state.

A workable response is specific: Document supported shells and completion activation separately from the localization of human help text. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Proof matters more than confidence in the wording. Generate or activate completion in a disposable shell and compare completed option identifiers with parser acceptance. Do not confuse one passing happy path with a complete check. Repeat a nearby invalid input and confirm the reader is told what to change, rather than being offered vague advice or a false success message.

21. Missing optional extras

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A production image installs only the default jsonargparse dependencies and a tutorial assumes docstring or completion extras are present. The package advertises optional features that may require explicit dependency extras and different deployment steps. Because a command line is read by people and interpreted by software, its apparent wording can hide a second meaning. The essential question is which part of the display is merely explanatory and which part controls a parser or side effect.

A workable response is specific: Record dependency groups and gate localized documentation by what the shipped environment really contains. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Proof matters more than confidence in the wording. Build two clean environments, one minimal and one with the chosen extras, then record capability differences. Re-run the test without an interactive terminal. A correct multilingual user experience must not corrupt redirected data or stall an automated job while waiting for a prompt that nobody can answer.

22. Upgrade migration

In FieldAtlas, a fictional tool for processing regional climate observation files, consider this situation: A previously stable parser is upgraded and translated guide examples still use old flags or outdated output descriptions. Internationalized manuals are themselves versioned interfaces; hidden incompatibilities become expensive across many locales. Many failures first appear as an innocent documentation mismatch. The reader copies what appears to be a valid instruction; the actual executable rejects it or accepts it with a different interpretation. That makes runnable examples an unusually valuable editorial check.

A workable response is specific: Treat each changed option, default and parser behavior as a release note with a translation impact assessment. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Proof matters more than confidence in the wording. Compare snapshots of –help and parsing fixtures from the old and new lockfiles before publishing each locale. Finally, look at accessibility: can the reader distinguish the key token from explanatory prose, and can the failure be understood without color, emoji or perfect visual alignment?

Chapter 5 — A multilingual terminal testing matrix

Compare a CLI invocation, YAML configuration, environment override, nested key, wrong-type error and UTF-8 path under each locale; inspect the resulting parsed namespace as well as the visible message. For a small international launch, begin with ten representative locales rather than claiming to cover every language. Languages are not merely a stress test for string length: they can expose issues with spacing, display direction, case changes, input methods, font availability and cultural assumptions. Use native review for final wording; machines can establish parser invariants, but they cannot decide whether instructions are respectful or understandable.

  • ar-EG Arabic: check copying from right-to-left prose into an otherwise left-to-right command and confirm digit/flag order
  • de-DE German: check compound descriptions and whether long help options wrap without hiding the important verb
  • es-ES Spanish: check whether option explanations keep the distinction between read-only preview and actual write
  • fr-FR French: check accented filenames, apostrophes and whether failure recovery is unambiguous
  • hi-IN Hindi: check Devanagari input and visually confusable punctuation in a narrow terminal
  • id-ID Indonesian: check concise word choice and whether task names identify the intended file operation
  • ja-JP Japanese: check kanji and kana filenames, half-width/full-width characters and copyable flag spellings
  • pt-BR Brazilian Portuguese: check longer explanations and sample paths with diacritics while preserving default values
  • th-TH Thai: check combining marks and Unicode rendering in help and diagnostic text
  • zh-CN Simplified Chinese: check Chinese path strings and whether technical option names remain visibly separate from explanations

Do not assume a given locale implies a particular script, proficiency level or platform. A Brazilian Portuguese reader may use a US English keyboard; an Arabic reader may run a headless Linux server. Locale selection, terminal encoding, filesystem behavior and shell are distinct variables. Test them separately so the team knows whether a problem belongs to translation, display, operating system or dependency behavior.

Chapter 6 — A four-week implementation and review plan

Week 1: capture the contract

Inventory every command, option, positional argument, output field and app-owned visible string. Install a locked release, collect a baseline help transcript and build a fixture for successful and failed invocations. The deliverable is a classification of translatable prose versus executable identifiers, plus a short list of user tasks the article must teach.

For Python jsonargparse, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Week 2: create one complete locale

Write translation keys for descriptions and recovery messages. Avoid hidden string concatenation. Apply the locale choice at an explicit boundary, then rerun the same commands with identical fixtures. Have one native reader explain each action before seeing its actual result. Review where translation makes a caution less specific.

For Python jsonargparse, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Week 3: exercise difficult environments

Add two non-Latin filename tests, one right-to-left help review, a narrow terminal capture, and a headless run with stdout redirected. Exercise every parsing failure represented in the guide and verify that any structured output remains parseable. Use actual build artifacts, not code snippets detached from packaging.

For Python jsonargparse, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Week 4: release with evidence

Freeze a reviewed glossary, update examples to match the pinned binary, publish a concise version note and keep a rollback copy. Sign off on parser invariants, native-language task success, accessibility, error recovery and release reproducibility. Assign an owner for each unfinished locale rather than hiding incompleteness behind a default translation.

For Python jsonargparse, make the evidence practical: save the exact shell invocation, the parser-facing identifiers, the user-facing sentence, the observed result and the responsible reviewer. Include a failed command so the guide demonstrates recovery as well as success. A completed week means these artifacts exist and a reader can repeat the task; it does not mean merely that translation files have been filled.

Chapter 7 — FAQs for maintainers and translators

Can we translate every command and flag?

Not automatically. Those spellings may be parser tokens consumed by scripts and code. Explain them in the reader’s language; introduce localized aliases only through an intentional compatible software change with tested conflict handling. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

Does the package provide automatic locale selection?

Do not assume it does. Check the installed release’s documentation. When localization is application-owned, choose a locale explicitly and pass translated descriptive text at construction time, keeping fallback rules visible. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

How should we deal with a library error that remains in English?

Distinguish the dependency’s diagnostic from the application’s recovery guidance. Record the exact error, avoid unsupported claims about translating internals and provide a localized next step that identifies the rejected input. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Should we translate example file paths?

Paths in runnable commands must refer to real fixtures. You can explain a path in translation and supply an appropriate local fixture, but arbitrary word replacement inside a path may make a copied example fail. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

What about technical words that lack a natural translation?

Use a short definition rather than a fabricated equivalent. Keep the actual flag or key in code type and add an explanation of its purpose and consequence. Consistency matters more than mechanical word-for-word matching. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

How do we test Chinese, Arabic or Hindi help?

Use genuine terminal rendering with representative input, not only browser screenshots. Verify character integrity, wraps, copying, text direction and underlying parser results. Where possible, include a native-language task review. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Can a translation alter exit codes?

It should not unless application behavior is intentionally changed. A diagnostic may be translated while the process status remains useful to scripts. Test success and failure separately and inspect both stdout and stderr. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Pair a human reading test with a machine assertion. The human catches ambiguity and discoverability problems; the assertion catches broken tokens, wrong types and unintended state changes.

Is a fluent machine translation enough?

No. It may miss command grammar, units, irreversibility and the difference between data and instructions. Run copyable examples, request a task-focused review and check the actual program output before release. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Keep the repair small. A translation change should not quietly enable permissive parsing, alter a default or introduce a different output format. Record such changes separately if they are actually required.

What is the best evidence for the article’s correctness?

A locked package version, executable examples, parser-output assertions, expected file effects, captured help, invalid-input recovery and approval from a native-language reviewer are more useful than an unsupported claim that the instructions are clear. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Instead of asking whether the sentence sounds polished, ask a new reader to predict the effect before pressing Enter. If the prediction is wrong, rewrite the explanation and retest the real invocation.

How do we prevent regressions next month?

Treat the documentation as a tested companion to the CLI. Rerun examples after package upgrades, compare flag inventories and help snapshots, and update translations when the behavior or wording actually changes. In FieldAtlas, a fictional tool for processing regional climate observation files, the concrete check is whether the same task remains reproducible for a person using another language. Preserve a baseline transcript in the project test suite. It should be possible to explain a changed behavior as a deliberate software change, not as an unnoticed consequence of translating an example.

Chapter 8 — What proficiency looks like

A professional localization is a reliable bridge between the user’s intention and the software’s actual action. The reader can identify which task to choose, distinguish harmless preview from irreversible change, copy a verified command and recover when an input fails. The program continues to recognize the same interface, produce stable data and report problems through channels that human and automated consumers can understand.

The aim for a Python developer maintaining a research or data-processing command-line tool that has readers in several countries is not simply more translated words. It is less guessing, fewer broken examples, safer execution and documentation that remains trustworthy through upgrades. Start with one command, one realistic error and one multilingual test fixture. Then grow deliberately, verifying every promise you put in front of a reader.

Recommended documentation and further reading