---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/translate/use-cases/translate-api-docs/copilot
---
# How to Translate API Docs with Copilot

Copilot brings translation directly into your i18n workflow, treating localization as a code task rather than an external handoff. Translate locale files, UI strings, and documentation without leaving your editor, then review the changes in your diff view alongside the rest of your code. This is ideal for developers who maintain localization as part of the build process, ensuring that new features ship with translations rather than accumulating a backlog of untranslated strings that need a separate localization pass.

## Setup

{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

## Steps

1. Add ToolRouter to Copilot MCP config
2. In Copilot Chat: "Translate docs/api-reference.md to Chinese using the translate tool"
3. Copilot creates the translated file with all code fences and URLs preserved
4. Review the diff to verify technical accuracy
5. Ask Copilot to translate the remaining API docs in the same directory

## Example Prompt

```
Translate all API documentation markdown files in docs/en/api/ to Chinese. Preserve code blocks, URLs, and parameter tables.
```

## Tips

- Copilot handles markdown code fences and inline code blocks intelligently
- Use for docs-as-code repos where translations live alongside source docs
- Ask Copilot to update the docs sidebar navigation for the new locale
