apps-language-rules
БесплатноБез исполняемых скриптовНе проверенDefine i18n and internalization rules for forum (React/i18next) and docs (VitePress locales) apps. Use when adding new UI strings, translating docs, adding…
от conectlens★ 18 звёзд на GitHubОб этом скилле
Apps Language Rules
Use when
- Adding new UI strings to
apps/web(must add toen.json+tr.jsonstubs) - Writing new documentation pages (English first; Turkish stub in
docs/tr/recommended) - Adding a new locale beyond
en/tr - Checking consistency of translations across JSON catalogs
- Setting up
hreflangSEO for multilingual pages - Reviewing React components for hardcoded strings that bypass i18next
Supported languages
| Code | Name | Default? | App locale files | Docs status |
|---|---|---|---|---|
en |
English | ✅ Yes | en.json |
Complete |
tr |
Türkçe | No | tr.json |
WIP |
es |
Español | No | not yet | Stub |
fr |
Français | No | not yet | Stub |
de |
Deutsch | No | not yet | Stub |
zh |
中文 | No | not yet | Stub |
ja |
日本語 | No | not yet | Stub |
ko |
한국어 | No | not yet | Stub |
ru |
Русский | No | not yet | Stub |
pt |
Português | No | not yet | Stub |
it |
Italiano | No | not yet | Stub |
All codes are registered in supabase/seeds/01_core_languages.sql and configured as VitePress locales in apps/docs/.vitepress/config.ts. Adding app locale JSON files is the primary contribution needed.
Forum i18n (apps/web — React + i18next)
Setup
- i18next initialised in
apps/web/src/i18n.ts - Locale files:
apps/web/src/locales/en.jsonandapps/web/src/locales/tr.json - Imported at app entry (
apps/web/src/index.tsx) before<App /> - Language detection order:
localStorage(lf-languagekey) → browser navigator → html tag - Fallback: English
Rules for adding strings
- Add key to
en.json(English, authoritative). - Add same key to
tr.jsonwith Turkish translation or""placeholder. - Use
useTranslation()hook in React components:const { t } = useTranslation(). - Never hardcode user-facing strings in JSX — always use
t('namespace.key'). - Use interpolation for dynamic values:
t('prompts.usedTimes', { count: n }).
Key naming convention
<feature>.<subkey>
nav.home → "Home" / "Ana Sayfa"
actions.copy → "Copy" / "Kopyala"
prompts.title → "Prompts" / "Promptlar"
errors.generic → "Something went wrong." / "Bir hata oluştu."
Language switcher
- Component:
libs/features/shell/src/lib/LanguageSwitcher.tsx - Placed in the forum
Header(top-right action area) - Calls
i18n.changeLanguage(code)and updatesdocument.documentElement.lang - Language is persisted in
localStorageunder keylf-language
SEO for forum (multilingual)
SEOHead.tsxrenders<link rel="canonical">,og:locale, and JSON-LD automaticallyhreflangalternates: include?lang=trquery param in alternates (no URL-prefix routing)<html lang="">is updated on language change byLanguageSwitcherapps/web/public/sitemap.xmlincludesxhtml:linkhreflang alternates for static routes
Docs i18n (apps/docs — VitePress locales)
Setup
- VitePress
localesconfig inapps/docs/.vitepress/config.ts - Root locale:
en(English) at/ - Turkish locale:
trat/tr/ - Language switcher is rendered automatically by VitePress in the top nav
Rules for adding doc pages
- Create English page at
docs/<section>/<slug>.md. - Add it to
themeConfig.sidebarinconfig.ts(English section). - Create Turkish stub at
docs/tr/<section>/<slug>.mdwith frontmatterlang: trand translation-pending notice. - Add Turkish sidebar entry to
locales.tr.themeConfig.sidebarinconfig.ts.
Turkish stub template
---
lang: tr
title: <Turkish Title>
---
# <Turkish Title>
> Bu sayfa henüz tam olarak Türkçeye çevrilmemiştir. [İngilizce sürümünü görüntüle.](/<english-path>)
Bu belge yakında Türkçe olarak tam içerikle güncellenecektir.
SEO for docs (multilingual)
hreflangalternates are in the globalheadarray inconfig.ts- VitePress
cleanUrls: trueensures canonical URLs without.html - VitePress
sitemapconfig auto-generatessitemap.xmlat build time robots.txtatapps/docs/public/robots.txtreferences the sitemap
Adding a new locale (beyond existing 11)
- Seed: Add
('code', 'Name', 'NativeName', 'ltr', true)tosupabase/seeds/01_core_languages.sql. - Arena: Add
apps/landing/src/locales/<code>.jsonmirroringen.json. Register inapps/landing/src/i18n.ts. - Web: Add
apps/web/src/locales/<code>.jsonmirroringen.json. Register inapps/web/src/i18n.ts. - Docs: Add
<code>entry tolocales{}inconfig.ts. Createdocs/<code>/index.mdanddocs/<code>/tutorials/getting-started/overview.md. Addhreflangtohead[]. UpdateinLanguagein JSON-LD. - Full step-by-step: see
docs/how-to/contributors/i18n-guide.mdand.claude/skills/language-integrator/SKILL.md.
Load only when needed
Установить apps-language-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл apps-language-rules?
Define i18n and internalization rules for forum (React/i18next) and docs (VitePress locales) apps. Use when adding new UI strings, translating docs, adding new locales, checking language consistency, or setting up hreflang SEO for multilingual pages.
Как установить скилл apps-language-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл apps-language-rules запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic