I18N Setup
Skill Profile
(Select at least one profile to enable specific modules)
Overview
This skill provides comprehensive guidance and best practices for implementation. It enables teams to achieve reliable, maintainable, and scalable solutions.
When to use / When NOT to use
- ✅ Use when: Implementing this capability in your project
- ✅ Use when: Need to follow established patterns and conventions
- ❌ Avoid when: The requirements don't match this skill's scope
- ❌ Avoid when: Simpler alternatives would suffice
Why This Matters
Internationalization (i18n) is the process of designing software applications to adapt to different languages and regions without requiring engineering changes. Effective i18n uses translation keys, pluralization rules, date/number formatting, and RTL support to create applications that work globally.
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
Inputs:
- User language preferences
- Translation files for each language
- Default locale settings
- Translation keys for all content
- Currency codes and symbols
- Date/time values
Outputs:
- Translated content based on user locale
- Formatted currency values
- Localized datetime values
- RTL-aware layouts
Contracts:
- All user-facing content uses translation keys
- All datetime values stored in UTC
- Currency values stored with currency code
- User preferences respected for display
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
i18n (Internationalization) Setup
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: amnadtaowsoam-cerebraskills-i18n-setup3description: I18N Setup4---56# I18N Setup78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17This skill provides comprehensive guidance and best practices for implementation. It enables teams to achieve reliable, maintainable, and scalable solutions.1819### When to use / When NOT to use20* ✅ **Use when**: Implementing this capability in your project21* ✅ **Use when**: Need to follow established patterns and conventions22* ❌ **Avoid when**: The requirements don't match this skill's scope23* ❌ **Avoid when**: Simpler alternatives would suffice242526## Why This Matters27Internationalization (i18n) is the process of designing software applications to adapt to different languages and regions without requiring engineering changes. Effective i18n uses translation keys, pluralization rules, date/number formatting, and RTL support to create applications that work globally.2829## Core Concepts & Rules3031### 1. Core Principles32- Follow established patterns and conventions33- Maintain consistency across codebase34- Document decisions and trade-offs3536### 2. Implementation Guidelines37- Start with the simplest viable solution38- Iterate based on feedback and requirements39- Test thoroughly before deployment404142## Inputs / Outputs / Contracts43**Inputs:**44- User language preferences45- Translation files for each language46- Default locale settings47- Translation keys for all content48- Currency codes and symbols49- Date/time values5051**Outputs:**52- Translated content based on user locale53- Formatted currency values54- Localized datetime values55- RTL-aware layouts5657**Contracts:**58- All user-facing content uses translation keys59- All datetime values stored in UTC60- Currency values stored with currency code61- User preferences respected for display6263## Skill Composition64* **Depends on**: None65* **Compatible with**: None66* **Conflicts with**: None67* **Related Skills**: None6869# i18n (Internationalization) Setup7071## Quick Start / Implementation Example72731. Review requirements and constraints742. Set up development environment753. Implement core functionality following patterns764. Write tests for critical paths775. Run tests and fix issues786. Document any deviations or decisions7980```python81# Example implementation following best practices82def example_function():83 # Your implementation here84 pass85```868788## Assumptions / Constraints / Non-goals8990* **Assumptions**:91 - Development environment is properly configured92 - Required dependencies are available93 - Team has basic understanding of domain94* **Constraints**:95 - Must follow existing codebase conventions96 - Time and resource limitations97 - Compatibility requirements98* **Non-goals**:99 - This skill does not cover edge cases outside scope100 - Not a replacement for formal training101102103## Compatibility & Prerequisites104105* **Supported Versions**:106 - Python 3.8+107 - Node.js 16+108 - Modern browsers (Chrome, Firefox, Safari, Edge)109* **Required AI Tools**:110 - Code editor (VS Code recommended)111 - Testing framework appropriate for language112 - Version control (Git)113* **Dependencies**:114 - Language-specific package manager115 - Build tools116 - Testing libraries117* **Environment Setup**:118 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)119120121## Test Scenario Matrix (QA Strategy)122123| Type | Focus Area | Required Scenarios / Mocks |124| :--- | :--- | :--- |125| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |126| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |127| **E2E** | User Journey | Critical user flows to test |128| **Performance** | Latency / Load | Benchmark requirements |129| **Security** | Vuln / Auth | SAST/DAST or dependency audit |130| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |131132133## Technical Guardrails & Security Threat Model134135### 1. Security & Privacy (Threat Model)136* **Top Threats**: Injection attacks, authentication bypass, data exposure137- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII138- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager139- [ ] **Authorization**: Validate user permissions before state changes140141### 2. Performance & Resources142- [ ] **Execution Efficiency**: Consider time complexity for algorithms143- [ ] **Memory Management**: Use streams/pagination for large data144- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks145146### 3. Architecture & Scalability147- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection148- [ ] **Modularity**: Decouple logic from UI/Frameworks149150### 4. Observability & Reliability151- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`152- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`153- [ ] **Error Handling**: Standardized error codes, no bare except154- [ ] **Observability Artifacts**:155 - **Log Fields**: timestamp, level, message, request_id156 - **Metrics**: request_count, error_count, response_time157 - **Dashboards/Alerts**: High Error Rate > 5%158159160## Agent Directives & Error Recovery161*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*162163- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.164- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.165- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.166- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.167168169## Definition of Done (DoD) Checklist170171- [ ] Tests passed + coverage met172- [ ] Lint/Typecheck passed173- [ ] Logging/Metrics/Trace implemented174- [ ] Security checks passed175- [ ] Documentation/Changelog updated176- [ ] Accessibility/Performance requirements met (if frontend)177178179## Anti-patterns / Pitfalls180181* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries182* ⚠️ **Watch out for**: Common symptoms and quick fixes183* 💡 **Instead**: Use proper error handling, pagination, and logging184185186## Reference Links & Examples187188* Internal documentation and examples189* Official documentation and best practices190* Community resources and discussions191192193## Versioning & Changelog194195* **Version**: 1.0.0196* **Changelog**:197 - 2026-02-22: Initial version with complete template structure198199---200> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.201<!-- tomevault:4.0:skill_md:2026-04-13 -->