MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Mkdocs-Translations

Mkdocs-Translations是一款learning方向的AI技能,核心价值是Generate a language translation for a mkdocs documentation stack,可用于解决开发者在learning领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Generate a language translation for a mkdocs documentation stack.

Last verified on: 2026-05-30
mkdir -p ./skills/mkdocs-translations && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/mkdocs-translations/SKILL.md -o ./skills/mkdocs-translations/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# 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:

- `es` for Spanish

- `fr` for French

- `pt-BR` for Brazilian Portuguese

- Mirror the exact folder and file structure from the original `en` directories.

- 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`

Replace `es` with the actual locale code provided by the user.


---


MkDocs Configuration Update


- [ ] Modify the `mkdocs.yml` configuration:

- [ ] Add a new `locale` entry under the `i18n` plugin using the target language code.

- [ ] Provide appropriate translations for:

- [ ] `nav_translations`

- [ ] `admonition_translations`


---


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

🎯 Best For

  • Technical writers
  • API documentation teams
  • Developers scaffolding new projects
  • Prototype builders
  • Claude users

💡 Use Cases

  • Generating JSDoc/TSDoc comments
  • Writing README files for new projects
  • Bootstrapping React components
  • Creating API route handlers

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Mkdocs-Translations to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does it follow my documentation style?

Most documentation skills respect existing style. Provide a style guide or example in your prompt.

Can I customize the generated output?

Yes — modify the skill's prompt instructions to match your project conventions and coding style.

How do I install Mkdocs-Translations?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/mkdocs-translations/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Auto-generating without reviewing

AI documentation can contain inaccuracies. Always verify technical accuracy.

Using generated code without understanding

Understand what generated code does before shipping it to production.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills