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.
.github/instructions/localization.instructions.mdWhat 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-caand save them underlocalization/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.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.claude/rules/localization.mdThe paths frontmatter field limits the files: move applyTo from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/localization.mdcFrontmatter: description, globs, alwaysApply. Move applyTo from the source into globs, or the rule will not attach on its own
Manually: put the files in place
.devin/rules/localization.mdManually: put the files in place
.clinerules/localization.mdStep 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