Loading...
Loading...
Translate Doc-Smith generated documentation into multiple languages. Use this skill when the user requests document translation, localization, or multi-language support. Supports batch translation of documents and images.
npx skill4agent add aigne-io/doc-smith-skills doc-smith-localize/doc-smith-localize --lang en # Translate all documents to English
/doc-smith-localize -l en -l ja # Translate to multiple languages
/doc-smith-localize -l en -p /overview # Translate only the specified document
/doc-smith-localize -l en --force # Force re-translation
/doc-smith-localize -l en --skip-images # Skip image translation| Option | Alias | Description |
|---|---|---|
| | Target language code (can be used multiple times) |
| | Specify document path (can be used multiple times) |
| | Force re-translation, overwrite existing translations |
| Skip image translation |
.aigne/doc-smith/config.yamlplanning/document-structure.yaml/doc-smith--path--force.aigne/doc-smith/glossary.yaml.md--skip-imagesgeneration.shared: true/doc-smith-images --updatetranslateLanguagesnode skills/doc-smith-build/scripts/build.mjs \
--nav --workspace .aigne/doc-smith --output .aigne/doc-smith/distdist/assets/nav.jsSource HTML → Extract translatable regions → Translate → Assemble target HTML → Save
dist/{source}/docs/{path}.html → dist/{target}/docs/{path}.html<title><meta name="description"><main data-ds="content"><nav data-ds="toc">Use separate Task tools to translate the following documents in parallel according to the references/translate-document.md process:
- docPath=/overview, targetLanguage=en, sourceLanguage=zh, force=false
- docPath=/api/auth, targetLanguage=en, sourceLanguage=zh, force=false/doc-smith-images "Translate text in images from {source} to {target}, keeping layout and style unchanged" \
--update .aigne/doc-smith/assets/{key}/images/{source}.png \
--savePath .aigne/doc-smith/assets/{key}/images/{target}.png \
--locale {target}images/{source}.pngimages/{target}.pngdist//doc-smith--path