Borrowing it
Nothing to install: this file belongs to MisonL/Ling. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/MisonL/Ling/main/.agents/skills/i18n-localization/SKILL.mdgit clone --depth 1 https://github.com/MisonL/LingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/misonl/ling/i18n-localization)<a href="https://agentmods.dev/skills/misonl/ling/i18n-localization"><img src="https://agentmods.dev/badge/skills/misonl/ling/i18n-localization/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/misonl/ling/i18n-localization"><img src="https://agentmods.dev/badge/skills/misonl/ling/i18n-localization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.00969 |
| Opus 5.5 | $0.00012 | $0.00388 |
| Sonnet 5.5 | $0.00006 | $0.00194 |
| Haiku 4.5 | $0.00003 | $0.00097 |
Grade A, and why
i18n-localization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
i18n 与本地化
国际化(i18n)与本地化(L10n)最佳实践。
1. 核心概念
| 术语 | 含义 |
|---|---|
| i18n | Internationalization(国际化)—— 使应用具备可翻译性 |
| L10n | Localization(本地化)—— 实际的翻译实施过程 |
| Locale | 语言 + 地区(例如:en-US, tr-TR) |
| RTL | Right-to-left(从右向左语言,如阿拉伯语、希伯来语) |
2. 何时使用 i18n
| 项目类型 | 是否需要 i18n? |
|---|---|
| 公共 Web 应用 | [OK] 是 |
| SaaS 产品 | [OK] 是 |
| 内部工具 | [WARN] 视情况而定 |
| 单一地区应用 | [WARN] 考虑未来扩展 |
| 个人项目 | [FAIL] 可选 |
3. 实现模式
React(react-i18next)
import { useTranslation } from 'react-i18next';
function Welcome() {
const { t } = useTranslation();
return <h1>{t('welcome.title')}</h1>;
}
Next.js(next-intl)
import { useTranslations } from 'next-intl';
export default function Page() {
const t = useTranslations('Home');
return <h1>{t('title')}</h1>;
}
Python(gettext)
from gettext import gettext as _
print(_("Welcome to our app"))
4. 文件结构
locales/
+-- en/
| +-- common.json
| +-- auth.json
| +-- errors.json
+-- tr/
| +-- common.json
| +-- auth.json
| +-- errors.json
+-- ar/ # RTL
+-- ...
5. 最佳实践
推荐 [OK]
- 使用翻译键值,而非原始文本
- 按功能模块对翻译进行命名空间划分
- 支持复数形式
- 根据不同地区处理日期/数字格式
- 从项目开始就规划 RTL 支持
- 对复杂字符串使用 ICU 消息格式
避免 [FAIL]
- 在组件中硬编码字符串
- 将多个翻译片段手动拼接
- 假设文本长度一致(德语通常比英语长 30%)
- 忘记考虑 RTL 布局
- 在同一个文件中混用不同语言
6. 常见问题
| 问题 | 解决方案 |
|---|---|
| 缺少翻译 | 回退到默认语言 |
| 硬编码字符串 | 使用 Linter/检查脚本 |
| 日期格式 | 使用 Intl.DateTimeFormat |
| 数字格式 | 使用 Intl.NumberFormat |
| 复数逻辑 | 使用 ICU 消息格式 |
7. RTL 支持
/* CSS Logical Properties */
.container {
margin-inline-start: 1rem; /* Not margin-left */
padding-inline-end: 1rem; /* Not padding-right */
}
[dir="rtl"] .icon {
transform: scaleX(-1);
}
8. 检查清单
在正式发布前:
- 所有面向用户的字符串都使用了翻译键值
- 所有支持的语言都有对应的本地化文件
- 日期/数字格式化使用了 Intl API
- RTL 布局已测试(如适用)
- 已配置默认回退语言
- 组件中没有硬编码字符串
脚本
| 脚本 | 用途 | 执行命令 |
|---|---|---|
scripts/i18n_checker.py |
检测硬编码字符串与缺失翻译 | python scripts/i18n_checker.py <project_path> |
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 155 lines · 31 tokens per session scan A 6fdc81abaa07
i18n-localization is a skill published in the GitHub repository MisonL/Ling (8 stars, last pushed 7mo ago), licensed MIT. It adds 31 tokens to every session and 969 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
intl-expansion
International market expansion strategy. Market selection, entry modes, localization, regulatory compliance, and go-to-market by region. Use when expanding to new countries, evaluating international markets, planning localization, or building regional teams.
chinese-documentation
A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.
azure-ai-translation-text-py
Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications. Triggers: "text translation", "translator", "translate text", "transliterate", "TextTranslationClient".
harden
Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.
edit-site
Plans, coordinates and customizes PAC CLI-downloaded Standard or Enhanced data model non-SPA Power Pages sites created from Microsoft templates or manually in Design Studio. Use for requests involving pages, localized content, navigation, assets, snippets, site markers, Liquid/web templates, page layouts, or styling.…
asc-subscription-localization
Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.