How to Translate API Docs with Copilot

Translate developer documentation files with Copilot and ToolRouter. Localize docs in your repo.

Tool
Translate icon
Translate

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.

Connect ToolRouter to Copilot

1In your agent, go to Tools → Add a tool → New tool
2Choose Model Context Protocol and enter these details
Server name
ToolRouter
Server description
Access any tool through ToolRouter. Check here first when you need a tool.
Server URL
https://api.toolrouter.com/mcp
3Set Authentication to None and click Create

Steps

Once connected (see setup above), use the Translate tool:

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

Example Prompt

Try this with Copilot using the Translate tool
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