بنقرة واحدة
i18n-localization
Internationalization and localization patterns for multi-language applications
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Internationalization and localization patterns for multi-language applications
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Pull request lifecycle domain knowledge — branch strategy detection, PR size classification, confidence-scored review, git-aware context, PR analytics, dependency management, and split/merge/describe operations.
Production readiness audit domains, weighted scoring criteria, and check specifications for the /preflight workflow.
Application scaffolding orchestrator. Creates full-stack applications from requirements, selects tech stack, coordinates agents.
Production deployment workflows, rollback strategies, and CI/CD best practices.
Mobile UI/UX patterns for iOS and Android. Touch-first, platform-respectful design with React Native/Expo focus.
Web application testing principles. E2E, Playwright, component testing, and deep audit strategies.
| name | i18n-localization |
| description | Internationalization and localization patterns for multi-language applications |
| triggers | ["i18n","internationalization","localization","l10n","translation","multi-language","locale","rtl"] |
This skill provides patterns and best practices for building multi-language applications with proper internationalization (i18n) and localization (l10n) support.
| Library | Use Case |
|---|---|
next-intl | Next.js App Router (recommended) |
react-intl / formatjs | React apps with ICU support |
i18next + react-i18next | Feature-rich, plugin ecosystem |
lingui | Compile-time extraction, small bundle |
| Library | Use Case |
|---|---|
i18next + react-i18next | Cross-platform (web + native) |
expo-localization | Device locale detection |
react-native-localize | Native locale detection |
| Library | Use Case |
|---|---|
i18next | Server-side translations |
messageformat | ICU message compilation |
globalize | CLDR-based formatting |
src/
├── locales/
│ ├── en/
│ │ ├── common.json # Shared translations
│ │ ├── auth.json # Auth-related strings
│ │ ├── dashboard.json # Dashboard strings
│ │ └── errors.json # Error messages
│ ├── tr/
│ │ ├── common.json
│ │ ├── auth.json
│ │ ├── dashboard.json
│ │ └── errors.json
│ └── de/
│ └── ...
├── i18n/
│ ├── config.ts # i18n configuration
│ ├── types.ts # Type-safe key definitions
│ └── middleware.ts # Locale detection middleware
{
"namespace.component.element": "Translation",
"auth.login.title": "Sign In",
"auth.login.emailLabel": "Email Address",
"auth.login.passwordLabel": "Password",
"auth.login.submitButton": "Sign In",
"auth.login.forgotPassword": "Forgot your password?",
"errors.validation.required": "{field} is required",
"errors.validation.minLength": "{field} must be at least {min} characters",
"errors.network.timeout": "Request timed out. Please try again."
}
// types.ts — Generate from default locale JSON
type TranslationKeys = keyof typeof import('./locales/en/common.json');
// Usage with next-intl
import { useTranslations } from 'next-intl';
function LoginForm() {
const t = useTranslations('auth.login');
return <h1>{t('title')}</h1>; // Type-checked!
}
{
"notifications.count": "{count, plural, =0 {No notifications} one {# notification} other {# notifications}}"
}
// Always use Intl API or library formatters
const formatted = new Intl.DateTimeFormat(locale, {
year: "numeric",
month: "long",
day: "numeric",
}).format(date);
const price = new Intl.NumberFormat(locale, {
style: "currency",
currency: "EUR",
}).format(amount);
/* Use logical properties instead of physical */
.container {
padding-inline-start: 1rem; /* Not padding-left */
margin-inline-end: 2rem; /* Not margin-right */
border-inline-start: 2px solid;
}
// middleware.ts
import createMiddleware from "next-intl/middleware";
export default createMiddleware({
locales: ["en", "tr", "de"],
defaultLocale: "en",
localeDetection: true,
});
export const config = {
matcher: ["/((?!api|_next|.*\\..*).*)"],
};
<html lang=""> and hreflang tags set/en/about or subdomain)❌ Hardcoding strings in components ❌ Using string concatenation for translated sentences ❌ Assuming left-to-right layout ❌ Using physical CSS properties (left/right) instead of logical (start/end) ❌ Formatting dates/numbers without locale context ❌ Storing translations in code instead of separate files
Source: Antigravity AI Kit — antigravity-ai-kit