Skip to main content
rule official · GitHub

localization — GitHub Copilot rule: Markdown localization

This rule guides GitHub Copilot through localizing Markdown files, preserving document links, checking the result, and adding a translated disclaimer.

Install into GitHub Copilot · Manually: put the files in place All methods and platforms ↓
.github/instructions/localization.instructions.md
Open on GitHub

What localization does

The rule targets **/*.md files. It directs Copilot to find Markdown documents, translate every section and paragraph into the requested locale, then save the files under localization/{{locale}}. Locale identifiers use a language code and a region code, such as fr-ca or ja-jp.

Image links should keep pointing to their original files; links between documents should lead to localized versions. Once translation is done, Copilot compares each result with its source line by line, including the line count. A translated disclaimer with a link to the issue page goes at the end of every document. That requirement adds a block to each localized file.

What it helps with

  • translate Markdown documents into a requested locale
  • save translated files under the locale directory
  • update internal links to localized documents
  • compare localized files with originals line by line
  • append a localized disclaimer to each document

Example prompts for the agent

  • Localize all Markdown files into fr-ca and save them under localization/fr-ca.
  • Translate the documents into ja-jp, keeping image links and updating links between documents.
  • Compare the localized files with their originals line by line, then add the translated disclaimer.

How to install localization

Manually: put the files in place

.github/instructions/localization.instructions.md

The applyTo field sets which files it applies to

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about localization

How do I install localization in GitHub Copilot?

Add the rule file at .github/instructions/localization.instructions.md.

What does the localization rule do?

It guides Markdown translation, specifies how document links should work, and requires a line-by-line check and a translated disclaimer.

What locale format does the rule expect?

Use a language code followed by a region code, such as en-us or pt-br. Localized documents go under localization/{{locale}}.

Source text

localization.instructions.md · MIT
---
description: 'Guidelines for localizing markdown documents'
applyTo: '**/*.md'
---

# Guidance for Localization

You're an expert of localization for technical documents. Follow the instruction to localize documents.

## Instruction

- Find all markdown documents and localize them into given locale.
- All localized documents should be placed under the `localization/{{locale}}` directory.
- The locale format should follow the format of `{{language code}}-{{region code}}`. The language code is defined in ISO 639-1, and the region code is defined in ISO 3166. Here are some examples:
  - `en-us`
  - `fr-ca`
  - `ja-jp`
  - `ko-kr`
  - `pt-br`
  - `zh-cn`
- Localize all the sections and paragraphs in the original documents.
- DO NOT miss any sections nor any paragraphs while localizing.
- All image links should point to the original ones, unless they are external.
- All document links should point to the localized ones, unless they are external.
- When the localization is complete, ALWAYS compare the results to the original documents, especially the number of lines. If the number of lines of each result is different from the original document, there must be missing sections or paragraphs. Review line-by-line and update it.

## Disclaimer

- ALWAYS add the disclaimer to the end of each localized document.
- Here's the disclaimer:

    ```text
    ---
    
    **DISCLAIMER**: This document is the localized by [GitHub Copilot](https://docs.github.com/copilot/about-github-copilot/what-is-github-copilot). Therefore, it may contain mistakes. If you find any translation that is inappropriate or mistake, please create an [issue](https://github.com/github/awesome-copilot/issues).
    ```

- The disclaimer should also be localized.
- Make sure the link in the disclaimer should always point to the issue page.

© github · MIT · github/awesome-copilot

Similar IDE rules

All IDE rules for Writing and docs →

From the same set949

The whole set →
markdown-gfm This rule tells Copilot how to write and review .md files in GitHub Flavored Markdown. Useful when docs have to render correctly on GitHub. ★ 40,451repo stars markdown-content-creation Sets Markdown formatting standards for blog posts by requiring YAML front matter, banning H1 headings, and enforcing clean code blocks and tables. ★ 40,451repo stars markdown-accessibility This rule reviews Markdown files for accessibility issues and suggests specific fixes. Use it when checking documentation or a GitHub profile page. ★ 40,451repo stars lwc Defines Salesforce Lightning Web Components conventions for GitHub Copilot, covering folder structure, standard UI tags, and SLDS utility classes. ★ 40,451repo stars langchain-python A GitHub Copilot instruction file that steers the agent toward LangChain patterns: Runnable, LCEL, chat models, retrievers and vector stores. Useful when your Python code talks to LangChain. ★ 40,451repo stars kubernetes-manifests Configures GitHub Copilot to generate production-ready Kubernetes manifests. Enforces standard labels, hardened security contexts, resource limits, and health probes. ★ 40,451repo stars kubernetes-deployment-best-practices This rule guides Copilot when drafting Kubernetes manifests, from deployment probes and resource settings to network access. Use it while building or reviewing a deployment. ★ 40,451repo stars kotlin-mcp-server A rule with patterns for building MCP servers in Kotlin on top of the official io.modelcontextprotocol:kotlin-sdk. It gives Copilot the context it needs to generate server code. ★ 40,451repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor