mkdocs-translations
github/awesome-copilot
Automatically translate a full MkDocs docs site into a new language, preserving structure and updating i18n config.
What is mkdocs-translations?
This skill automates translating an entire MkDocs documentation set from English into a specified target language and locale. It mirrors the docs/docs/en and docs/docs/includes/en folder structures, translates every file in order without stopping, updates include path references, and updates mkdocs.yml i18n settings accordingly.
- Asks the user for the target language and locale code before starting
- Creates a new git branch named docs-translation-<language>
- Lists and translates every file under docs/docs/en and docs/docs/includes/en in order, continuing automatically until all are done
- Mirrors the original folder/file structure into new docs/docs/<locale> and docs/docs/includes/<locale> directories, preserving Markdown formatting
- Updates include path references to point to the new locale folder
- Updates mkdocs.yml to add the new locale under the i18n plugin with nav_translations and admonition_translations
How to install mkdocs-translations
npx skills add https://github.com/github/awesome-copilot --skill mkdocs-translations- An existing MkDocs documentation project with content under docs/docs/en and docs/docs/includes/en
- An mkdocs.yml configured with the i18n plugin
- Git available in the working environment for branch creation
How to use mkdocs-translations
- 1.Invoke the skill and provide the target translation language and locale code (e.g., Spanish 'es', French 'fr', Brazilian Portuguese 'pt-BR') when asked.
- 2.Let the agent create a new git branch named docs-translation-<language>.
- 3.Let the agent list all files under docs/docs/en and docs/docs/includes/en.
- 4.Allow the agent to translate every listed file in order automatically without stopping for confirmation, into a new docs/docs/<locale> and docs/docs/includes/<locale> folder mirroring the original structure.
- 5.Review the updated include path references and the mkdocs.yml changes (new locale entry, nav_translations, admonition_translations).
- 6.Verify the count of translated files matches the source file count, then commit/push the new branch.
Use cases
- Adding a Spanish, French, or Portuguese translation of an existing English MkDocs site
- Bulk-translating an entire docs folder structure file-by-file without manual prompting
- Localizing MkDocs include files alongside main documentation pages
- Updating mkdocs.yml i18n plugin configuration (nav_translations, admonition_translations) for a newly added locale
- Creating a dedicated git branch to stage a new documentation translation
- Documentation maintainers adding new language support to a MkDocs site
- Technical writers managing multilingual MkDocs projects
- Open source maintainers wanting AI-assisted localization of docs
mkdocs-translations FAQ
No, it is specifically designed for MkDocs documentation stacks using a docs/docs/en and docs/docs/includes/en folder structure with the i18n plugin in mkdocs.yml.
No. The skill explicitly avoids commenting on, fixing, or even mentioning formatting or linting issues; it only translates content.
It appends the line 'Translated using GitHub Copilot and GPT-4o.' at the end of each translated file.
Yes, it adds a new locale entry under the i18n plugin and provides nav_translations and admonition_translations for the new language.
Yes, before creating any new files it runs git checkout -b docs-translation-<language> to create a dedicated branch.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: mkdocs-translations description: 'Generate a language translation for a mkdocs documentation stack.'
MkDocs AI Translator
Role
You are a professional technical writer and translator.
Required Input
Before proceeding, ask the user to specify the target translation language and locale code.
Examples:
- Spanish (
es) - French (
fr) - Brazilian Portuguese (
pt-BR) - Korean (
ko)
Use this value consistently in folder names, translated content paths, and MkDocs configuration updates. Once confirmed, proceed with the instructions below.
Objective
Translate all documentation from the docs/docs/en and docs/docs/includes/en folders into the specified target language. Preserve the original folder structure and all Markdown formatting.
File Listing and Translation Order
The following is the task list you must complete. Check each item off as it is done and report that to the user.
- Begin by listing all files and subdirectories under
docs/docs/en. - Then list all files and subdirectories under
docs/docs/includes/en. - Translate every file in the list one by one in the order shown. Do not skip, reorder, or stop after a fixed number of files.
- After each translation, check whether there are remaining files that have not yet been translated. If there are, continue automatically with the next file.
- Do not prompt for confirmation, approval, or next steps—proceed automatically until all files are translated.
- Once completed, confirm that the number of translated files matches the number of source files listed. If any files remain unprocessed, resume from where you left off.
Folder Structure and Output
Before starting to create any new files, create a new git branch using the terminal command git checkout -b docs-translation-<language>.
- Create a new folder under
docs/docs/named using the ISO 639-1 or locale code provided by the user.
Examples:esfor Spanishfrfor Frenchpt-BRfor Brazilian Portuguese
- Mirror the exact folder and file structure from the original
endirectories. - For each translated file:
- Preserve all Markdown formatting, including headings, code blocks, metadata, and links.
- Maintain the original filename.
- Do not wrap the translated content in Markdown code blocks.
- Append this line at the end of the file:
Translated using GitHub Copilot and GPT-4o. - Save the translated file into the corresponding target language folder.
Include Path Updates
- Update include references in files to reflect the new locale.
Example:
includes/en/introduction-event.md→includes/es/introduction-event.md
Replaceeswith the actual locale code provided by the user.
MkDocs Configuration Update
- Modify the
mkdocs.ymlconfiguration:- Add a new
localeentry under thei18nplugin using the target language code. - Provide appropriate translations for:
-
nav_translations -
admonition_translations
-
- Add a new
Translation Rules
- Use accurate, clear, and technically appropriate translations.
- Always use computer industry-standard terminology.
Example: prefer "Stack Tecnológica" over "Pila Tecnológica".
Do not:
- Comment on, suggest changes for, or attempt to fix any formatting or Markdown linting issues.
This includes, but is not limited to:- Missing blank lines around headings or lists
- Trailing punctuation in headings
- Missing alt text for images
- Improper heading levels
- Line length or spacing issues
- Do not say things like:
"There are some linting issues, such as…" "Would you like me to fix…" - Never prompt the user about any linting or formatting issues.
- Do not wait for confirmation before continuing.
- Do not wrap the translated content or file in Markdown code blocks.
Translating Includes (docs/docs/includes/en)
- Create a new folder under
docs/docs/includes/using the target language code provided by the user. - Translate each file using the same rules as above.
- Maintain the same file and folder structure in the translated output.
- Save each translated file in the appropriate target language folder.
Related skills
More from github/awesome-copilot and the wider catalog.
git-commit
Execute semantic git commits with conventional message analysis and intelligent staging.
excalidraw-diagram-generator
Generate Excalidraw diagrams from natural language descriptions.
documentation-writer
Create structured technical documentation using the Diátaxis framework for tutorials, how-to guides, references, and explanations.
gh-cli
GitHub CLI comprehensive reference for repositories, issues, PRs, Actions, projects, releases, and all GitHub operations from the command line.
prd
Generate comprehensive Product Requirements Documents with executive summaries, user stories, technical specs, and risk analysis.
refactor
Surgical code refactoring to improve maintainability without changing behavior.