i18n-tools
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@i18n-toolstranslate 'Good morning' to French"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@yyc3/i18n-core
๐ YYCยณ Production-Ready Internationalization Framework
้ซๆง่ฝใๆไปถๅใ้ถไพ่ต็ i18n ่งฃๅณๆนๆก๏ผไธไธบ็ฐไปฃ Web ๅบ็จ่ฎพ่ฎก
ๆฆ่ฟฐ
@yyc3/i18n-core ๆฏ YYCยณ๏ผYanYuCloudCube๏ผๆบ่ฝๅบ็จ้พไธญ็ๅฝ้ ๅๅบ็ก่ฎพๆฝๅฑ๏ผไธบๆดไธช็ๆๆไพๅค่ฏญ่จใAI็ฟป่ฏใMCPๅ่ฎฎ้ๆ่ฝๅใๅฎไธไป ๆฏไธไธช็ฌ็ซ็ i18n ๆกๆถ๏ผๆดๆฏ YYCยณ ็ๆใไบ้ซไบๆ ไบๅไบ็ปดใๆ ธๅฟ็ๅฟตๅจๅฝ้ ๅ้ขๅ็ๅ ทไฝ่ฝๅฐใ
ๅจ YYCยณ ็ๆไธญ็ๅฎไฝ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YYCยณ ๆบ่ฝๅบ็จ็ๆ โ
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ YYCยณ-CLI โ โ YYCยณ-ฯยณ โ โ Family-PAI โ โ
โ โ ๆๆกฃ็ๆ โ โ ่ฎพ่ฎกๅทฅๅ
ท โ โ AIๅบ็จ้พ โ โ
โ โ ๅผๆ โ โ ็ปไปถๆไปถ โ โ โ โ
โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโผโโโโโโโ โ
โ โ @yyc3/i18n โ โ ๅฝๅ้กน็ฎ โ
โ โ -core โ โ
โ โโโโโโโโฌโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โ AI็ฟป่ฏๅผๆ โ โMCP Serverโ โICU็ผ่ฏๅจ โ โ
โ โ(OpenAI+ โ โ(AI Agent โ โ(10่ฏญ่จ+ โ โ
โ โ Ollama) โ โ ๅทฅๅ
ท้ๆ) โ โ RTLๆฏๆ) โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโไธ YYCยณ-CLI ็่กๆฅ
YYCยณ-CLI ๆฏ YYCยณ ็ๆ็ๆๆกฃๅ
จ็ๅฝๅจๆ็ๆๅผๆ๏ผv2.0.0๏ผ๏ผ่ด่ดฃ้กน็ฎๅๅงๅใๆ ๅๅๆๆกฃ็ๆใDevOps่ฟ็ปดใ@yyc3/i18n-core ไธๅ
ถๅฝขๆไปฅไธๅๅ๏ผ
ๅๅๅบๆฏ | CLI ่่ดฃ | i18n-core ่่ดฃ |
้กน็ฎๅๅงๅ |
| ่ชๅจๆณจๅ ฅ i18n ้ ็ฝฎ๏ผlocales/ + ๅผๆๅฎไพ๏ผ |
ๅค่ฏญ่จๆๆกฃ | ็ๆ็ฌฆๅ YYCยณ ๆ ๅ็ๆๆกฃๆถๆ | ไธบ็ๆ็ๆๆกฃๆไพ 10 ่ฏญ่จ็ฟป่ฏๆฏๆ |
AI ่ต่ฝ | AI ้ฉฑๅจ็ๆๆกฃ/ไปฃ็ ็ๆ | AI ็ฟป่ฏๅผๆ๏ผOpenAI + Ollama๏ผๅค็จๅไธ AI ๅบ็ก่ฎพๆฝ |
MCP ๅ่ฎฎ | AI Agent ๅทฅๅ ท้พ็ผๆ | ๆไพ i18n MCP Server ไฝไธบ Agent ๅฏ่ฐ็จๅทฅๅ ท |
CI/CD ้ๆ | DevOps ๆตๆฐด็บฟ็ผๆ | ๆไพ |
ๆ ธๅฟไปทๅผไธปๅผ
็ปดๅบฆ | ไผ ็ป i18n ๆนๆก | @yyc3/i18n-core |
AI ็ฟป่ฏ | ้ๅคๆฅ SaaS / ๆๅจ็ฟป่ฏ | ๅ็้ๆ OpenAI + Ollama ๅๅผๆ |
AI ๅไฝ | ๆ AI Agent ๆฅๅฃ | ่กไธ้ฆไธช i18n MCP Server๏ผ7 ไธชๅทฅๅ ท๏ผ |
ไพ่ต้พ | 3-10 ไธช่ฟ่กๆถไพ่ต | ้ถไพ่ต โ ๆ ไพๅบ้พ้ฃ้ฉ |
ๅฎๅ จ | ๅบ็กๆญฃๅ | OWASP L4 ๅฎๅ จ็ฉ้ต๏ผReDoS้ฒๆค/ๅฏ้ฅ็ญๅผ/้็้ๅถ๏ผ |
็ๆ | ็ฌ็ซๅทฅๅ ท | YYCยณ ๆบ่ฝๅบ็จ้พๅ็็ปไปถ |
ๆ็ฅๆนๅ: ่ฏฆ่ง ่กไธๆๆฏ่ถๅฟๅๆไธๅ จ้พ่ทฏ่ฝๅฐๆนๆก โ MCPๅ่ฎฎ็ๆ็ๅ๏ผ15,382+ Server / 9700ไธSDKๆไธ่ฝฝ๏ผ๏ผi18n MCP Server ๅ ๆฏ<1%๏ผ@yyc3/i18n-core ๆญฃๅคไบ่ฟไธช่ๆตท่ต้็ๆ ธๅฟไฝ็ฝฎใ
Related MCP server: @langapi/mcp-server
๏ฟฝ๏ฟฝ ็ฎๅฝ
โจ ็นๆงๆฆ่ง
๐ฏ ๆ ธๅฟไผๅฟ
็นๆง | ๆ่ฟฐ | ็ถๆ |
้ถไพ่ต่ฟ่กๆถ | ๆ ไปปไฝ็ไบงไพ่ต๏ผ็บฏ TypeScript ๅฎ็ฐ | โ |
10 ็ง่ฏญ่จๅ ็ฝฎ | en/zh-CN/zh-TW/ja/ko/fr/de/es/pt-BR/ar(RTL) | โ |
AI ็ฟป่ฏ้ๆ | OpenAI + Ollama ๆฌๅฐๆจกๅๆฏๆ | โ |
MCP ๅ่ฎฎๅ็ | AI Agent ๅทฅๅ ท้ๆ๏ผ7 ไธช i18n ๅทฅๅ ท | โ |
ICU MessageFormat | ๅฎๆดๅฎ็ฐ๏ผ12 ็ง่ฏญๆณ็ฑปๅ | โ |
RTL ๅ็ๆฏๆ | ้ฟๆไผฏ่ฏญ็ญ RTL ่ฏญ่จๅธๅฑ่ชๅจๅค็ | โ |
LRU ็ผๅญ็ณป็ป | <0.1ms ็ผๅญๅฝไธญๅๅบๆถ้ด | โ |
ๆไปถๅๆถๆ | ๅฏๆฉๅฑ็็ๅฝๅจๆ้ฉๅญ็ณป็ป | โ |
ไผไธ็บงๅฎๅ จ | OWASP L4 ๅฎๅ จๆ ๅ | โ |
๐ ไธไธปๆตๆนๆกๅฏนๆฏ
็นๆง | @yyc3/i18n-core | react-i18next | vue-i18n | typesafe-i18n |
ไพ่ตๆฐ้ | 0 | 3+ | 2+ | 0 |
ๆๅ ๅคงๅฐ | ~15KB | ~33KB | ~1.5MB | ~1KB |
AI ็ฟป่ฏ | โ ๅ ็ฝฎ | ๆไปถ | ๆไปถ | โ |
MCP ๅ่ฎฎ | โ ๅ ็ฝฎ | โ | โ | โ |
ICU MessageFormat | โ ๅฎๆด | ๆไปถ | ๅบ็ก | ๅบ็ก |
RTL ๆฏๆ | โ ๅ็ | ้ ็ฝฎ | ้ ็ฝฎ | โ |
ๅฎๅ จ็ญ็บง | OWASP L4 | ๅบ็ก | ๅบ็ก | โ |
ไธญๆไผๅ | 10 ่ฏญ่จ | ้ ็ฝฎ | ้ ็ฝฎ | ้ ็ฝฎ |
๐ค ไธบไปไน้ๆฉ @yyc3/i18n-core?
1๏ธโฃ ็ๆญฃ็้ถไพ่ต
npm install @yyc3/i18n-core
# ไป
ๆญคไธไธชๅ
๏ผๆ ๅ
ถไปไพ่ต2๏ธโฃ ๅผ็ฎฑๅณ็จ็ไธญๆๆฏๆ
import { i18n, t } from '@yyc3/i18n-core';
// 10 ็ง่ฏญ่จๅณๆถๅฏ็จ
await i18n.setLocale('zh-CN'); // ็ฎไฝไธญๆ
await i18n.setLocale('zh-TW'); // ็นไฝไธญๆ
await i18n.setLocale('ja'); // ๆฅ่ฏญ
await i18n.setLocale('ko'); // ้ฉ่ฏญ
// ... ๆดๅค3๏ธโฃ AI ่ต่ฝ็ฟป่ฏ
import { AIProviderManager, OpenAIProvider } from '@yyc3/i18n-core/ai';
const ai = new AIProviderManager();
ai.register(new OpenAIProvider({ apiKey: 'your-key' }));
const result = await ai.translate({
sourceText: 'Hello World',
sourceLocale: 'en',
targetLocale: 'zh-CN',
});
console.log(result.translatedText); // "ไฝ ๅฅฝไธ็"4๏ธโฃ MCP ๅ่ฎฎๅ็้ๆ
import { MCPServer, registerI18nTools, StdioTransport } from '@yyc3/i18n-core/mcp';
const server = new MCPServer({
name: 'i18n-tools',
version: '1.4.0',
transport: new StdioTransport(),
});
registerI18nTools(server);
await server.start();
// ็ฐๅจ Claude/Cursor ็ญ AI ๅทฅๅ
ทๅฏไปฅไฝฟ็จ i18n ๅ่ฝไบ๏ผ๐ฆ ๅฎ่ฃ ๆๅ
ๅ็ฝฎ่ฆๆฑ
Node.js >= 16.0.0
TypeScript >= 5.0 (ๆจ่๏ผไฝไนๆฏๆ JavaScript)
ๅฎ่ฃ ๅฝไปค
# ไฝฟ็จ npm
npm install @yyc3/i18n-core
# ไฝฟ็จ pnpm (ๆจ่)
pnpm add @yyc3/i18n-core
# ไฝฟ็จ yarn
yarn add @yyc3/i18n-core้ช่ฏๅฎ่ฃ
import { i18n, t } from '@yyc3/i18n-core';
console.log(t('common.welcome')); // "Welcome"
console.log('โ
@yyc3/i18n-core ๅฎ่ฃ
ๆๅ');๐ ๅฟซ้ๅผๅง
1. ๆ็ฎไฝฟ็จ โ ้ถ้ ็ฝฎๅฏๅจ
import { i18n, t } from '@yyc3/i18n-core';
// ็ดๆฅไฝฟ็จ๏ผๆ ้้
็ฝฎ
t('common.welcome'); // "Welcome"
// ๅๆข่ฏญ่จ
await i18n.setLocale('zh-CN');
t('common.welcome'); // "ๆฌข่ฟ"2. ๅธฆๆไปถ็ๅฎๆด้ ็ฝฎ
import { i18n, t, I18nEngine } from '@yyc3/i18n-core';
import {
createConsoleLogger,
MissingKeyReporter,
PerformanceTracker,
} from '@yyc3/i18n-core/plugins';
// ๅๅปบๅผๆๅฎไพ
const engine = new I18nEngine({
defaultLocale: 'en',
fallbackLocale: 'en',
cache: {
maxSize: 1000,
ttl: 3600000, // 1ๅฐๆถ
},
});
// ๆณจๅๆไปถ
engine.plugins.register(createConsoleLogger());
engine.plugins.register(new MissingKeyReporter().createPlugin());
engine.plugins.register(
new PerformanceTracker({ slowThreshold: 10 }).createPlugin()
);
// ๅๅงๅ
await engine.init();
// ไฝฟ็จ
engine.t('greeting', { name: 'World' }); // "Hello, World!"3. React ้กน็ฎ้ๆ
// App.tsx
import { useEffect, useState } from 'react';
import { i18n, t } from '@yyc3/i18n-core';
function App() {
const [locale, setLocale] = useState('en');
useEffect(() => {
i18n.setLocale(locale);
}, [locale]);
return (
<div>
<h1>{t('app.title')}</h1>
<p>{t('greeting', { name: 'User' })}</p>
<select value={locale} onChange={(e) => setLocale(e.target.value)}>
<option value="en">English</option>
<option value="zh-CN">ไธญๆ</option>
<option value="ja">ๆฅๆฌ่ช</option>
</select>
</div>
);
}4. Vue ้กน็ฎ้ๆ
<template>
<div>
<h1>{{ $t('app.title') }}</h1>
<button @click="changeLocale('zh-CN')">ไธญๆ</button>
<button @click="changeLocale('en')">English</button>
</div>
</template>
<script setup lang="ts">
import { i18n, t } from '@yyc3/i18n-core';
import { ref } from 'vue';
const changeLocale = async (locale: string) => {
await i18n.setLocale(locale);
};
</script>5. Node.js / ๅ็ซฏไฝฟ็จ
// server.ts
import { I18nEngine } from '@yyc3/i18n-core';
const i18n = new I18nEngine({
defaultLocale: 'zh-CN',
});
export function middleware(req, res, next) {
const locale = req.headers['accept-language']?.split(',')[0] || 'zh-CN';
i18n.setLocale(locale);
req.t = (key, params?) => i18n.t(key, params);
next();
}
// ๅจ่ทฏ็ฑไธญไฝฟ็จ
app.get('/api/hello', (req, res) => {
res.json({ message: req.t('hello') });
});๐๏ธ ๆถๆ่ฎพ่ฎก
ๅๅฑๆถๆ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application Layer โ
โ (React / Vue / Angular / Node.js) โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Public API Layer โ
โ i18n / t / I18nEngine / PluginManager โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โผ โผ โผ โผ
โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ
โ Core โ โ Cache โ โ Plugins โ โ Formats โ
โ Engine โ โ LRU โ โ System โ โ ICU/MF โ
โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ
โ โ โ โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โผ โผ โผ โผ
โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ
โ AI โ โ MCP โ โ Security โ โ RTL โ
โ Translationโ โ Server โ โ OWASP L4 โ โ Utils โ
โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโๆจกๅ่่ดฃ
ๆจกๅ | ๆไปถ่ทฏๅพ | ่่ดฃ | ๅคๆๅบฆ |
Core Engine |
| ็ฟป่ฏๅผๆใ่ฏญ่จๅๆขใๅๆฐๆๅผ | โญโญโญ |
Cache System |
| LRU ็ผๅญใTTL ่ฟๆใ็ป่ฎก | โญโญ |
Plugin System |
| ็ๅฝๅจๆ้ฉๅญใไบไปถ่ฎข้ | โญโญ |
ICU Engine |
| MessageFormat ่งฃๆไธ็ผ่ฏ | โญโญโญ |
AI Translation |
| LLM ็ฟป่ฏใ่ดจ้่ฏไผฐ | โญโญโญ |
MCP Server |
| ๅ่ฎฎๅฎ็ฐใๅทฅๅ ทๆณจๅ | โญโญโญ |
Security |
| ReDoS้ฒๆคใๆณจๅ ฅๆฃๆต | โญโญ |
RTL Utils |
| ๅธๅฑ้ๅใๆนๅๆฃๆต | โญ |
ๆฐๆฎๆต
็จๆท่ฐ็จ t(key, params)
โ
Plugin.beforeTranslate()
โ
Cache Lookup โ Hit? โ Return Cached Result
โ Miss
ICU Parser โ Parse Syntax Tree
โ
Formatter โ Interpolate Parameters
โ
Plugin.afterTranslate()
โ
Cache.Store(Result)
โ
Return Translated String๐ฆ ๆ ธๅฟๆจกๅ่ฏฆ่งฃ
1. Core Engine (@yyc3/i18n-core)
็ฟป่ฏๅผๆ็ๆ ธๅฟ๏ผๆไพๅฎๆด็ i18n ่ฝๅใ
import { I18nEngine, i18n, t } from '@yyc3/i18n-core';
// ๆนๅผ1: ไฝฟ็จๅ
จๅฑๅไพ (ๆจ่็ฎๅๅบๆฏ)
t('welcome'); // "Welcome"
t('greeting', { name: 'World' }); // "Hello, World!"
// ๆนๅผ2: ๅๅปบ็ฌ็ซๅฎไพ (ๆจ่ๅคๆๅบๆฏ)
const engine = new I18nEngine({
defaultLocale: 'en',
fallbackLocale: 'en',
debug: false,
});
await engine.init();
// ๅๆข่ฏญ่จ
await engine.setLocale('zh-CN');
// ๆน้็ฟป่ฏ
const results = await engine.batchTranslate(['key1', 'key2', 'key3']);
// ่ทๅ็ป่ฎกไฟกๆฏ
const stats = engine.getStats();
console.log(stats.cacheHits, stats.cacheMisses);
// ่ฎข้
่ฏญ่จๅๆด
engine.onLocaleChange((from, to) => {
console.log(`Locale changed: ${from} -> ${to}`);
});I18nEngineConfig ๆฅๅฃ
interface I18nEngineConfig {
defaultLocale?: string; // ้ป่ฎค่ฏญ่จ: 'en'
fallbackLocale?: string; // ๅ้่ฏญ่จ: 'en'
debug?: boolean; // ่ฐ่ฏๆจกๅผ: false
cache?: CacheConfig; // ็ผๅญ้
็ฝฎ
plugins?: I18nPlugin[]; // ๅๅงๆไปถๅ่กจ
onError?: (error: Error) => void; // ้่ฏฏๅค็
missingKeyHandler?: (key: string) => string; // ็ผบๅคฑ้ฎๅค็
}2. Cache System (@yyc3/i18n-core/cache)
้ซๆง่ฝ LRU ็ผๅญ๏ผๆพ่ๆๅ็ฟป่ฏๆง่ฝใ
import { LRUCache } from '@yyc3/i18n-core/cache';
// ๅๅปบ็ผๅญๅฎไพ
const cache = new LRUCache<string, string>({
maxSize: 1000, // ๆๅคง็ผๅญๆก็ฎ
ttl: 3600000, // ่ฟๆๆถ้ด (1ๅฐๆถ)
});
// ๅญๅๆฐๆฎ
cache.set('key', 'value');
const value = cache.get('key'); // "value"
// ็ผๅญๆชๅฝไธญ
cache.get('nonexistent'); // undefined
// ่ทๅ็ป่ฎกไฟกๆฏ
const stats: CacheStats = cache.getStats();
console.log(stats.hits, stats.misses, stats.size);
// ๆๅจๆธ
็
cache.clear();
cache.delete('key');ๆง่ฝๆๆ
ๆไฝ | ๆถ้ดๅคๆๅบฆ | ๅนณๅ่ๆถ |
get() | O(1) | <0.1ms |
set() | O(1) | <0.1ms |
ๆน้ๆฅๆพ | O(n) | <1ms (100 keys) |
3. Plugin System (@yyc3/i18n-core/plugins)
ๅฏๆฉๅฑ็ๆไปถๆถๆ๏ผๆฏๆ็ๅฝๅจๆ้ฉๅญใ
import {
PluginManager,
createConsoleLogger,
MissingKeyReporter,
PerformanceTracker,
} from '@yyc3/i18n-core/plugins';
// ๆณจๅๅ
็ฝฎๆไปถ
i18n.plugins.register(createConsoleLogger());
i18n.plugins.register(new MissingKeyReporter().createPlugin());
i18n.plugins.register(new PerformanceTracker({ slowThreshold: 10 }).createPlugin());
// ่ชๅฎไนๆไปถ
i18n.plugins.register({
name: 'analytics-plugin',
beforeTranslate(key: string) {
console.log(`[Analytics] Translating: ${key}`);
// ่ฟๅ true ็ปง็ปญๆง่ก๏ผ่ฟๅ false ไธญๆญ
return true;
},
afterTranslate(result: string, key: string) {
console.log(`[Analytics] Result: ${result}`);
},
onLocaleChange(from: string, to: string) {
console.log(`[Analytics] Locale: ${from} -> ${to}`);
},
});
// ็งป้คๆไปถ
i18n.plugins.unregister('analytics-plugin');ๅ ็ฝฎๆไปถๅ่กจ
ๆไปถๅ | ็จ้ | ้ ็ฝฎ้กน |
ConsoleLogger | ๅผๅ่ฐ่ฏๆฅๅฟ | ๆ |
MissingKeyReporter | ็ไบง็ฏๅข็ผบๅคฑ้ฎ็ๆง |
|
PerformanceTracker | ๆง่ฝๆๆ ๆถ้ |
|
4. ICU MessageFormat (@yyc3/i18n-core/icu)
ๅฎๆด็ ICU MessageFormat ๅฎ็ฐ๏ผๆฏๆๅคๆฐใ้ๆฉ็ญๅคๆ่ฏญๆณใ
import { ICUParser, ICUCompiler } from '@yyc3/i18n-core/icu';
// ่งฃๆ ICU ่ฏญๆณ
const parser = new ICUParser();
const ast = parser.parse('{count, plural, one {# item} other {# items}}');
// ็ผ่ฏๅนถๆธฒๆ
const compiler = new ICUCompiler({ locale: 'en' });
const result = compiler.compile(ast, { count: 5 });
console.log(result); // "5 items"
// ๅจๅผๆไธญ็ดๆฅไฝฟ็จ (่ชๅจๆฃๆต ICU ่ฏญๆณ)
t('items_count', { count: 5 }); // ่ชๅจ่ทฏ็ฑๅฐ ICU ็ผ่ฏๅจๆฏๆ็ ICU ่ฏญๆณ
่ฏญๆณ็ฑปๅ | ็คบไพ | ่ฏดๆ |
Plural |
| ๅคๆฐ่งๅ |
Select |
| ๆกไปถ้ๆฉ |
SelectOrdinal |
| ๅบๆฐ่ฏ |
Number |
| ๆฐๅญๆ ผๅผๅ |
Date |
| ๆฅๆๆ ผๅผๅ |
Time |
| ๆถ้ดๆ ผๅผๅ |
Offset |
| ๅ็งป้ |
5. AI Translation (@yyc3/i18n-core/ai)
LLM ้ฉฑๅจ็ๆบ่ฝ็ฟป่ฏ๏ผๆฏๆ OpenAI ๅๆฌๅฐ Ollamaใ
import {
AIProviderManager,
OpenAIProvider,
OllamaProvider,
QualityEstimator,
} from '@yyc3/i18n-core/ai';
// ๅๅปบ AI ็ฎก็ๅจ
const ai = new AIProviderManager();
// ๆณจๅ OpenAI Provider
ai.register(new OpenAIProvider({
apiKey: process.env.OPENAI_API_KEY!,
model: 'gpt-4o-mini',
}));
// ๆๆณจๅ Ollama Provider (ๅ
่ดนๆฌๅฐๆจกๅ)
ai.register(new OllamaProvider({
baseUrl: 'http://localhost:11434',
model: 'qwen2.5:3b',
}));
// ๆง่ก็ฟป่ฏ
const result = await ai.translate({
sourceText: 'Hello World',
sourceLocale: 'en',
targetLocale: 'zh-CN',
context: 'UI label for welcome message',
});
console.log(result.translatedText); // "ไฝ ๅฅฝไธ็"
console.log(result.confidence); // 0.95
// ่ดจ้่ฏไผฐ
const qe = new QualityEstimator();
const quality = await qe.estimate({
sourceText: 'Hello World',
translatedText: 'ไฝ ๅฅฝไธ็',
sourceLocale: 'en',
targetLocale: 'zh-CN',
});
console.log(quality.score); // 0.98
console.log(quality.issues); // [] (ๆ ้ฎ้ข)ๆฏๆ็ AI Provider
Provider | ็ฑปๅ | ๆๆฌ | ๅปถ่ฟ | ้็จๅบๆฏ |
OpenAI | ไบ็ซฏ API | ๐ฐ๐ฐ | ไฝ (<2s) | ็ไบง็ฏๅข |
Ollama | ๆฌๅฐๆจกๅ | ๅ ่ดน | ไธญ (~3s) | ๅผๅ/็ฆป็บฟ |
6. MCP Server (@yyc3/i18n-core/mcp)
Model Context Protocol ๆๅก็ซฏ๏ผ่ฎฉ AI Agent ็ดๆฅไฝฟ็จ i18n ๅทฅๅ ทใ
import {
MCPServer,
registerI18nTools,
StdioTransport,
} from '@yyc3/i18n-core/mcp';
// ๅๅปบ MCP Server
const server = new MCPServer({
name: 'yyc3-i18n-tools',
version: '1.4.0',
transport: new StdioTransport(),
});
// ๆณจๅ 7 ไธช i18n ๅทฅๅ
ท
registerI18nTools(server);
// ๅฏๅจๆๅก
await server.start();
console.log('MCP Server running...');
// ๅฏ็จๅทฅๅ
ท:
// 1. search_translations - ๆ็ดข็ฟป่ฏ
// 2. add_translation_key - ๆทปๅ ็ฟป่ฏ้ฎ
// 3. translate_key - ็ฟป่ฏๅไธช้ฎ
// 4. check_missing_keys - ๆฃๆฅ็ผบๅคฑ้ฎ
// 5. get_locale_stats - ่ทๅ่ฏญ่จ็ป่ฎก
// 6. set_locale - ่ฎพ็ฝฎๅฝๅ่ฏญ่จ
// 7. quality_report - ็ฟป่ฏ่ดจ้ๆฅๅMCP ๅทฅๅ ท่ฏฆๆ
ๅทฅๅ ทๅ | ๅ่ฝ | ๅๆฐ |
| ๆ็ดข็ฟป่ฏๅ ๅฎน | query, locale, limit |
| ๆทปๅ ๆฐ็ฟป่ฏ้ฎ | key, translations |
| ็ฟป่ฏๆๅฎ้ฎ | key, targetLocale |
| ๆฃๆฅ็ผบๅคฑ็็ฟป่ฏ้ฎ | locale |
| ่ทๅ่ฏญ่จ็ป่ฎกไฟกๆฏ | - |
| ่ฎพ็ฝฎๅฝๅ่ฏญ่จ | locale |
| ็ๆ่ดจ้ๆฅๅ | locale |
7. RTL Support (@yyc3/i18n-core โ ๅ
็ฝฎ)
RTL (Right-to-Left) ่ฏญ่จ็ๅ็ๆฏๆใ
import {
isRTL,
setupDocumentDirection,
flipSpacing,
getAlignment,
createMirroredLayout,
} from '@yyc3/i18n-core';
// ๆฃๆตๆฏๅฆไธบ RTL ่ฏญ่จ
isRTL('ar'); // true
isRTL('he'); // true
isRTL('en'); // false
// ่ชๅจ่ฎพ็ฝฎๆๆกฃๆนๅ
setupDocumentDirection('ar');
// <html dir="rtl" lang="ar">
// CSS ๅฑๆง็ฟป่ฝฌ
flipSpacing({ marginLeft: 10, marginRight: 20 }, 'rtl');
// โ { marginLeft: 20, marginRight: 10 }
// ่ทๅๅฏน้ฝๆนๅผ
getAlignment('ltr'); // 'left'
getAlignment('rtl'); // 'right'
// ๅๅปบ้ๅๅธๅฑ
const layout = createMirroredLayout('rtl');
layout.mainAxis; // 'right'
layout.crossAxis; // 'left'ๆฏๆ็ RTL ่ฏญ่จ
่ฏญ่จ | ไปฃ็ | ๆนๅ |
้ฟๆไผฏ่ฏญ | ar | RTL |
ๅธไผฏๆฅ่ฏญ | he | RTL |
ๆณขๆฏ่ฏญ | fa | RTL |
ไนๅฐ้ฝ่ฏญ | ur | RTL |
๐ณ ๅญ่ทฏๅพๅฏผๅ ฅ๏ผTree Shaking๏ผ
ๆ้ๅผๅ ฅ๏ผๆ่ดไผๅๆๅ ไฝ็งฏ
// ๅ
จ้จๅ่ฝ (~15KB gzipped)
import { i18n, t, I18nEngine } from '@yyc3/i18n-core'
// ไป
็ผๅญ็ณป็ป (~3KB gzipped)
import { LRUCache } from '@yyc3/i18n-core/cache'
// ไป
ๆไปถ็ณป็ป (~4KB gzipped)
import { PluginManager, createConsoleLogger } from '@yyc3/i18n-core/plugins'
// ไป
ICU ๅผๆ (~5KB gzipped)
import { ICUParser, ICUCompiler } from '@yyc3/i18n-core/icu'
// ไป
AI ็ฟป่ฏ (~4KB gzipped)
import { AIProviderManager, OpenAIProvider } from '@yyc3/i18n-core/ai'
// ไป
MCP ๆๅก็ซฏ (~3KB gzipped)
import { MCPServer, registerI18nTools } from '@yyc3/i18n-core/mcp'ๅฏ็จๅญ่ทฏๅพ
ๅญ่ทฏๅพ | ๅคงๅฐไผฐ่ฎก(gzipped) | ๅฏผๅบๅ ๅฎน | ้็จๅบๆฏ |
| ~15KB | ๅ จ้จๅ่ฝ | ๅฐๅ้กน็ฎ / ๅฟซ้ๅๅ |
| ~3KB | LRU Cache ็ณป็ป | ้่ฆ้ซๆง่ฝ็ผๅญ |
| ~4KB | ๆไปถ็ฎก็ๅจ + ๅ ็ฝฎๆไปถ | ้่ฆๆฉๅฑๅ่ฝ |
| ~5KB | ICU ่งฃๆๅจ/็ผ่ฏๅจ | ๅคๆๆถๆฏๆ ผๅผ |
| ~4KB | AI ็ฟป่ฏ + ่ดจ้่ฏไผฐ | ้่ฆ LLM ็ฟป่ฏ |
| ~3KB | MCP Server + Transport | AI Agent ้ๆ |
ๆๅ ไฝ็งฏๅฏนๆฏ
ๅบๆฏ | ๆชไผๅ | Tree Shakingๅ | ่็
-------------------------|--------|----------------|------
ๅฎๆดๅฏผๅ
ฅ | 15KB | 15KB | -
ไป
็จ Core + Cache | 15KB | 8KB | 47%
ไป
็จ ICU ๅผๆ | 15KB | 5KB | 67%
ไป
็จ AI Translation | 15KB | 4KB | 73%
ไป
็จ MCP Server | 15KB | 3KB | 80%๐ API ๅ่
ๆ ธๅฟๅฏผๅบ
// ====== ไธปๅ
ฅๅฃ ======
import {
// Engine
I18nEngine, i18n, t,
// Cache
LRUCache,
type CacheConfig, type CacheStats,
// Plugins
PluginManager,
createConsoleLogger, MissingKeyReporter, PerformanceTracker,
type I18nContext, type I18nPlugin,
// Formatter
formatRelativeTime, interpolate, pluralize,
type TranslateParams,
// Locale Detection
detectSystemLocale, isChineseLocale, normalizeLocale,
type LocaleDetectionResult,
// RTL Utilities
isRTL, setupDocumentDirection, flipSpacing, getAlignment,
getDirection, getOppositeAlignment, mirrorPosition,
createMirroredLayout, transformClassForRTL,
type HorizontalAlignment, type TextDirection,
// Types
type Locale, type RTLLocale, type TranslationMap,
} from '@yyc3/i18n-core'
// ====== ๅญ่ทฏๅพๅฏผๅ
ฅ ======
// Cache
import { LRUCache } from '@yyc3/i18n-core/cache'
// Plugins
import { PluginManager, createConsoleLogger } from '@yyc3/i18n-core/plugins'
// ICU
import { ICUParser, ICUCompiler } from '@yyc3/i18n-core/icu'
// AI
import { AIProviderManager, OpenAIProvider, QualityEstimator } from '@yyc3/i18n-core/ai'
// MCP
import { MCPServer, registerI18nTools, StdioTransport } from '@yyc3/i18n-core/mcp'ๆ ธๅฟ API
t() โ ็ฟป่ฏๅฝๆฐ
function t(key: string, params?: TranslateParams): string;
// ๅบๆฌ็จๆณ
t('welcome'); // "Welcome"
// ๅๆฐๆๅผ
t('greeting', { name: 'World' }); // "Hello, World!"
// ๅตๅฅๅฏน่ฑก
t('user.profile.name'); // ไปๅตๅฅๅฏน่ฑก่ทๅ
// ICU ่ฏญๆณ (่ชๅจๆฃๆต)
t('items', { count: 5 }); // "5 items"i18n โ ๅ
จๅฑๅไพ
// ๅ
จๅฑๅไพ๏ผๆ ้ๅๅปบๅฎไพ
const i18n: I18nEngine;
// ๅๆข่ฏญ่จ
await i18n.setLocale('zh-CN');
// ่ทๅๅฝๅ่ฏญ่จ
i18n.currentLocale; // 'zh-CN'
// ๆน้็ฟป่ฏ
const results = await i18n.batchTranslate(['k1', 'k2', 'k3']);
// ่ทๅ็ป่ฎก
const stats = i18n.getStats();
// ไบไปถ็ๅฌ
i18n.onLocaleChange((from, to) => {});I18nEngine โ ๅผๆ็ฑป
class I18nEngine {
constructor(config?: I18nEngineConfig);
init(): Promise<void>;
destroy(): Promise<void>;
setLocale(locale: string): Promise<void>;
t(key: string, params?: TranslateParams): string;
batchTranslate(keys: string[]): Promise<Record<string, string>>;
getTranslations(): TranslationMap;
getStats(): EngineStats;
onLocaleChange(callback: (from: string, to: string) => void): () => void;
plugins: PluginManager;
}๐ง ้ซ็บงๅ่ฝ
1. ๅฝๅ็ฉบ้ด (Namespaces)
import { createNamespace } from '@yyc3/i18n-core';
// ๅๅปบๅฝๅ็ฉบ้ด
const userNS = createNamespace('user');
const productNS = createNamespace('product');
// ไฝฟ็จๅฝๅ็ฉบ้ด
userNS.t('profile.name'); // user.profile.name
productNS.t('detail.title'); // product.detail.title2. ่ฐ่ฏๆจกๅผ
const engine = new I18nEngine({ debug: true });
// ๆต่งๅจๆงๅถๅฐ่ฎฟ้ฎ
window.__i18n_debug__ = {
engine,
getCurrentState: () => ({
locale: engine.currentLocale,
cache: engine.cache.getStats(),
plugins: engine.plugins.list(),
}),
};
// ๅผๅๆถๆฅ็็ถๆ
console.log(window.__i18n_debug__.getCurrentState());3. ๅคๅฎไพๆฏๆ
import { I18nEngine } from '@yyc3/i18n-core';
// ๅๅปบๅคไธช็ฌ็ซๅฎไพ
const adminI18n = new I18nEngine({ defaultLocale: 'zh-CN' });
const userI18n = new I18nEngine({ defaultLocale: 'en' });
// ๅ่ช็ฌ็ซ่ฟ่ก
adminI18n.t('dashboard.title'); // ไธญๆ
userI18n.t('home.welcome'); // English4. ่ชๅฎไน้่ฏฏๅค็
const engine = new I18nEngine({
onError: (error) => {
// ๅ้ๅฐ้่ฏฏ่ฟฝ่ธชๆๅก
Sentry.captureException(error);
},
missingKeyHandler: (key) => {
console.warn(`[i18n] Missing key: ${key}`);
return `[MISSING: ${key}]`; // ่ฟๅๅ ไฝ็ฌฆ
},
});5. ๆง่ฝ็ๆง
import { PerformanceTracker } from '@yyc3/i18n-core/plugins';
const tracker = new PerformanceTracker({
slowThreshold: 10, // ๆ
ขๆฅ่ฏข้ๅผ (ms)
percentiles: [50, 90, 95, 99],
}).createPlugin();
i18n.plugins.register(tracker);
// ่ทๅๆง่ฝๆฅๅ
const report = tracker.getReport();
console.log(report.percentiles.p95); // 95ๅไฝๅปถ่ฟ
console.log(report.slowQueries); // ๆ
ขๆฅ่ฏขๅ่กจ๐จ ๆไฝณๅฎ่ทต
โ ๆจ่ๅๆณ
ไฝฟ็จๅ จๅฑๅไพ่ฟ่ก็ฎๅ้กน็ฎ
import { i18n, t } from '@yyc3/i18n-core'; t('key'); // ็ฎๆดๆไบไฝฟ็จ็ฌ็ซๅฎไพ่ฟ่กๅคงๅ้กน็ฎ
const engine = new I18nEngine({ /* config */ });ๅฉ็จ Tree Shaking ๅๅฐไฝ็งฏ
import { ICUParser } from '@yyc3/i18n-core/icu'; // ไป ๅผๅ ฅๆ้ๆจกๅๅฏ็จ็ไบง็ฏๅขๆไปถ
if (process.env.NODE_ENV === 'production') { i18n.plugins.register(new MissingKeyReporter().createPlugin()); }็ปๅ AI ็ฟป่ฏๆๅๆ็
const ai = new AIProviderManager(); ai.register(new OllamaProvider()); // ๅ ่ดนๆฌๅฐ็ฟป่ฏ
โ ้ฟๅ ๅๆณ
ไธ่ฆๅจๅพช็ฏไธญ้ข็น่ฐ็จ
setLocale// โ ้่ฏฏ: ๆง่ฝ้ฎ้ข for (const item of items) { await i18n.setLocale(item.locale); } // โ ๆญฃ็กฎ: ๆน้ๅค็ const translations = await i18n.batchTranslate(keys);ไธ่ฆๅฟฝ็ฅ้่ฏฏๅค็
// โ ้่ฏฏ: ๅฏ่ฝๆๅผๅธธ t(userProvidedKey); // โ ๆญฃ็กฎ: ้ ็ฝฎ missingKeyHandler const engine = new I18nEngine({ missingKeyHandler: (key) => `[${key}]`, });ไธ่ฆๅจ็ไบง็ฏๅขๅผๅฏ debug ๆจกๅผ
// โ ้่ฏฏ: ๆณ้ฒๅ ้จไฟกๆฏ const engine = new I18nEngine({ debug: true }); // โ ๆญฃ็กฎ: ไป ๅผๅ็ฏๅข const engine = new I18nEngine({ debug: process.env.NODE_ENV === 'development', });
๐งช ๆต่ฏ่ฆ็
ๆต่ฏ็ฉ้ต
ๆจกๅ | ๆต่ฏๆไปถ | ็จไพๆฐ | ้่ฟ็ | ่ฆ็็ |
Core Engine | engine-v2.test.ts | 45 | 100% | 94% |
Cache | (ๅซๅจ engine tests) | 30 | 100% | 96% |
Plugins | plugins.test.ts | 25 | 100% | 91% |
Formatter | formatter.test.ts | 35 | 100% | 93% |
Detector | detector.test.ts | 20 | 100% | 89% |
RTL Utils | rtl-utils.test.ts | 28 | 100% | 92% |
Translate | translate.test.ts, translate-full.test.ts | 60 | 100% | 95% |
ICU Parser/Compiler | icu/parser-compiler.test.ts | 40 | 100% | 90% |
AI Providers | ai/providers.test.ts | 35 | 100% | 87% |
Quality Estimator | ai/quality-estimator.test.ts | 25 | 100% | 85% |
MCP Server | mcp/server.test.ts, mcp/i18n-tools.test.ts | 40 | 100% | 88% |
Security | security/*.test.ts | 30 | 100% | 93% |
Infrastructure | infra/*.test.ts | 30 | 100% | 90% |
ๆป่ฎก | 28 files | 443 | โ 100% | 92.5% |
่ฟ่กๆต่ฏ
# ๅ
จ้ๆต่ฏ
pnpm test
# ็ๅฌๆจกๅผ (ๅผๅๆถ)
pnpm test:watch
# ่ฆ็็ๆฅๅ
pnpm test:coverage
# ๅไธชๆไปถ
pnpm test -- engine-v2.test.ts
# ๅน้
ๆต่ฏๅ
pnpm test -- -t "should translate with interpolation"โก ๆง่ฝๅบๅ
ๅๅบๆถ้ด (Node.js 20, M2 Mac)
ๆไฝ | ๅนณๅ่ๆถ | P99 ่ๆถ | QPS |
็ฎๅ็ฟป่ฏ (็ผๅญๅฝไธญ) | 0.02ms | 0.05ms | 50,000+ |
ๅธฆๅๆฐ็ฟป่ฏ | 0.05ms | 0.12ms | 20,000+ |
ICU ๅคๆฐ่งๅ | 0.15ms | 0.35ms | 6,500+ |
ๆน้็ฟป่ฏ (100 keys) | 8ms | 15ms | 12,000+ |
AI ็ฟป่ฏ (Ollama) | 1500ms | 3000ms | 0.67 |
AI ็ฟป่ฏ (OpenAI) | 800ms | 2000ms | 1.25 |
ๅ ๅญๅ ็จ
ๅบๆฏ | ๅ ๅญๅ ็จ | ่ฏดๆ |
็ฉบๅผๆ | ~2MB | ๅบ็กๅผ้ |
ๅ ่ฝฝ 1 ่ฏญ่จ | ~5MB | ๅซ็ฟป่ฏๆฐๆฎ |
ๅ ่ฝฝ 10 ่ฏญ่จ | ~25MB | ๅ จ้จๅ ็ฝฎ่ฏญ่จ |
็ผๅญ 10000 ๆก็ฎ | ~8MB | LRU Cache |
AI Provider | ~50MB | ๆจกๅๅ ่ฝฝ |
๐ก๏ธ ๅฎๅ จ็นๆง
OWASP Level 4 ๅฎๅ จๆ ๅ
ๅฎๅ จ็ปดๅบฆ | ๅฎ็ฐๆนๅผ | ็ถๆ |
ReDoS ้ฒๆค | ๅฎๅ จๆญฃๅ็ผ่ฏ๏ผ่ถ ๆถไธญๆญ | โ |
ๆถๅบๆปๅป้ฒๆค | ๅธธ้ๆถ้ดๅญ็ฌฆไธฒๆฏ่พ | โ |
่ทฏๅพ้ๅ้ฒๆค | ็ฎๅฝ้้ธๆฃๆตไธ้ปๆญข | โ |
ๆณจๅ ฅๆฃๆต | SQL/Command ๆณจๅ ฅๆจกๅผ่ฏๅซ | โ |
ๅ ๅฏ้ๆบๆฐ | ไฝฟ็จ crypto.randomBytes | โ |
ๅฎๅ จ็คบไพ
import { safeRegexCompile } from '@yyc3/i18n-core/lib/security/safe-regex';
import { constantTimeStringEqual } from '@yyc3/i18n-core/lib/security/secret-equal';
import { guardAgainstPathTraversal } from '@yyc3/i18n-core/lib/utils/path-guards';
// ๅฎๅ
จ็ๆญฃๅ่กจ่พพๅผ็ผ่ฏ (้ฒ ReDoS)
const regex = safeRegexCompile(userInput, { timeout: 1000 });
// ๅธธ้ๆถ้ดๆฏ่พ (้ฒๆถๅบๆปๅป)
const isEqual = constantTimeStringEqual(tokenA, tokenB);
// ่ทฏๅพ้ๅ้ฒๆค
guardAgainstPathTraversal('../../etc/passwd'); // ๆๅบ SecurityErrorโ ๅธธ่ง้ฎ้ข
Q1: ๅฆไฝๆทปๅ ่ชๅฎไน่ฏญ่จ๏ผ
import { i18n } from '@yyc3/i18n-core';
// ๅจๆๅ ่ฝฝ็ฟป่ฏ
await i18n.addLocale('custom-LANG', {
welcome: 'ๆฌข่ฟ',
greeting: 'ไฝ ๅฅฝ๏ผ{name}๏ผ',
});Q2: ๅฆไฝๅจ SSR (ๆๅก็ซฏๆธฒๆ) ไธญไฝฟ็จ๏ผ
// Next.js ็คบไพ
import { I18nEngine } from '@yyc3/i18n-core';
let engine: I18nEngine;
export async function getServerSideProps(context) {
engine = new I18nEngine();
await engine.init();
await engine.setLocale(context.locale);
return {
props: {
initialLocale: context.locale,
translations: engine.getTranslations(),
},
};
}Q3: ๅฆไฝๅค็ๅจๆ็ฟป่ฏ้ฎ๏ผ
// ไฝฟ็จ missingKeyHandler ๆฆๆชๆช็ฅ้ฎ
const engine = new I18nEngine({
missingKeyHandler: (key) => {
// ๅ้ๅฐ็ฟป่ฏๆๅกๆ่ฟๅ้ป่ฎคๅผ
logMissingKeyToServer(key);
return humanizeKey(key); // 'user.profile.name' โ 'User Profile Name'
},
});Q4: AI ็ฟป่ฏ็่ดจ้ๅฆไฝไฟ่ฏ๏ผ
import { QualityEstimator } from '@yyc3/i18n-core/ai';
const qe = new QualityEstimator();
const result = await qe.estimate({
sourceText: 'Hello',
translatedText: 'ไฝ ๅฅฝ',
sourceLocale: 'en',
targetLocale: 'zh-CN',
});
if (result.score > 0.9 && result.issues.length === 0) {
console.log('โ
็ฟป่ฏ่ดจ้ไผ็ง');
} else {
console.log('โ ๏ธ ้่ฆไบบๅทฅๅฎกๆ ธ:', result.issues);
}Q5: ๅฆไฝไธ็ฐๆ i18n ๆนๆก่ฟ็งป๏ผ
่ฏทๅ่่ฏฆ็ป็ ่ฟ็งปๆๅ๏ผๆถต็ไป react-i18nextใvue-i18n ็ญๆนๆก็ๅฎๆด่ฟ็งปๆญฅ้ชคใ
๐ ่ฟ็งปๆๅ
ไป v1.x ๅ็บงๅฐ v2.x
ไธป่ฆ Breaking Changes:
ๅ ๅๅๆด:
@yyc3/i18nโ@yyc3/i18n-core็ฑปๅ้ๅฝๅ:
I18nManagerโI18nEngineๆไปถๆฅๅฃๆดๆฐ: ๆฐๅขๅฟ ้็
nameๅฑๆง้ ็ฝฎๆ ผๅผ่ฐๆด: Cache ๅ Debug ้ ็ฝฎ็ปๆๅๅ
่ฏฆ็ป่ฟ็งปๆญฅ้ชค่ฏทๅ้ MIGRATION_GUIDE.mdใ
๐ค ่ดก็ฎๆๅ
ๆไปฌๆฌข่ฟ็คพๅบ่ดก็ฎ๏ผ่ฏท้ตๅพชไปฅไธๆต็จ๏ผ
Fork ๆฌไปๅบ
ๅๅปบ็นๆงๅๆฏ (
git checkout -b feature/amazing-feature)ๆไบคๆดๆน (
git commit -m 'Add amazing feature')ๆจ้ๅๆฏ (
git push origin feature/amazing-feature)ๅผๅฏ Pull Request
ๅผๅๆต็จ
# ๅ
้ไปๅบ
git clone https://github.com/YanYuCloudCube/Family-PAI.git
# ๅฎ่ฃ
ไพ่ต
pnpm install
# ่ฟๅ
ฅ i18n-core ๅ
็ฎๅฝ
cd packages/i18n-core
# ๅผๅๆจกๅผ
pnpm build:watch
# ่ฟ่กๆต่ฏ
pnpm test
# ็ฑปๅๆฃๆฅ
pnpm lint
# ๆ ผๅผๅไปฃ็
pnpm formatไปฃ็ ่ง่
TypeScript strict mode
ไธบๅ ฌๅ ฑ API ๆทปๅ JSDoc ๆณจ้
ๆฐๅ่ฝๅฟ ้กปๅ ๅซๅฏนๅบๆต่ฏ
้ตๅพช OWASP ๅฎๅ จ็ผ็ ่ง่
๐ License
MIT ยฉ YYCยณ AI Team
YYCยณ AI Family โ ๅ ซไฝๆไบบๅAIๅฎถไบบ็ๆบ่ฝไธญๆข
ไบ้ซ ยท ไบๆ ยท ไบๅ ยท ไบ็ปด
ๆๆกฃ็ๆฌ: 2.3.0 | ๆๅๆดๆฐ: 2026-04-24
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseAqualityDmaintenanceAI-powered localization platform. Translate text, search translation memory, and access style guides from any MCP-compatible AI tool.Last updated81MIT- Alicense-qualityBmaintenanceMCP server for AI-powered translation management in i18n projects, enabling automated locale detection, translation status checks, and sync via LangAPI.Last updated641MIT
- Alicense-qualityCmaintenanceAn MCP server that lets AI agents read and write locale JSON translation files directly from the conversation without loading the whole catalog into context.Last updated191ISC
- AlicenseAqualityCmaintenanceMCP server for managing i18n translation files โ gives your AI agent full control over your app's translations without dumping entire locale files into context.Last updated1325110MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/YYC-Cube/YYC3-i18n-Core'
If you have feedback or need assistance with the MCP directory API, please join our Discord server