Localization
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Localization (l10n) is the process of adapting an internationalized application to specific languages and regions. It goes beyond translation to include cultural, regional, and technical adaptations like date formats, currency, timezones, and cultural preferences.
Why This Matters
Core Concepts
| Cultural | Adapt to cultural norms |
| Regional | Adapt to regional preferences |
| Technical | Format dates, numbers, currencies |
| Visual | Adapt images, colors, layouts |
Inputs / Outputs / Contracts
- Inputs:
- <e.g., env vars, request payload, file paths, schema>
- Entry Conditions:
- <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>
- Outputs:
- <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>
- Artifacts Required (Deliverables):
- <e.g., Code Diff, Unit Tests, Migration Script, API Docs>
- Acceptance Evidence:
- <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>
- Success Criteria:
- <e.g., p95 < 300ms, coverage ≥ 80%>
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Quick Start
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
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: localization-23description: Localization (l10n) is the process of adapting an internationalized application Use when this capability is needed.4---56# Localization78## 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## Overview17Localization (l10n) is the process of adapting an internationalized application to specific languages and regions. It goes beyond translation to include cultural, regional, and technical adaptations like date formats, currency, timezones, and cultural preferences.1819## Why This Matters20- **<Benefit>**: <short explanation>21- **<Benefit>**: <short explanation>22- **<Benefit>**: <short explanation>2324## Core Concepts25| **Cultural** | Adapt to cultural norms |26| **Regional** | Adapt to regional preferences |27| **Technical** | Format dates, numbers, currencies |28| **Visual** | Adapt images, colors, layouts |2930## Inputs / Outputs / Contracts31* **Inputs**:32 - <e.g., env vars, request payload, file paths, schema>33* **Entry Conditions**:34 - <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>35* **Outputs**:36 - <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>37* **Artifacts Required (Deliverables)**:38 - <e.g., Code Diff, Unit Tests, Migration Script, API Docs>39* **Acceptance Evidence**:40 - <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>41* **Success Criteria**:42 - <e.g., p95 < 300ms, coverage ≥ 80%>4344## Skill Composition45* **Depends on**: None46* **Compatible with**: None47* **Conflicts with**: None48* **Related Skills**: None4950## Quick Start51#5253## Assumptions / Constraints / Non-goals5455* **Assumptions**:56 - Development environment is properly configured57 - Required dependencies are available58 - Team has basic understanding of domain59* **Constraints**:60 - Must follow existing codebase conventions61 - Time and resource limitations62 - Compatibility requirements63* **Non-goals**:64 - This skill does not cover edge cases outside scope65 - Not a replacement for formal training666768## Compatibility & Prerequisites6970* **Supported Versions**:71 - Python 3.8+72 - Node.js 16+73 - Modern browsers (Chrome, Firefox, Safari, Edge)74* **Required AI Tools**:75 - Code editor (VS Code recommended)76 - Testing framework appropriate for language77 - Version control (Git)78* **Dependencies**:79 - Language-specific package manager80 - Build tools81 - Testing libraries82* **Environment Setup**:83 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)848586## Test Scenario Matrix (QA Strategy)8788| Type | Focus Area | Required Scenarios / Mocks |89| :--- | :--- | :--- |90| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |91| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |92| **E2E** | User Journey | Critical user flows to test |93| **Performance** | Latency / Load | Benchmark requirements |94| **Security** | Vuln / Auth | SAST/DAST or dependency audit |95| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |969798## Technical Guardrails & Security Threat Model99100### 1. Security & Privacy (Threat Model)101* **Top Threats**: Injection attacks, authentication bypass, data exposure102- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII103- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager104- [ ] **Authorization**: Validate user permissions before state changes105106### 2. Performance & Resources107- [ ] **Execution Efficiency**: Consider time complexity for algorithms108- [ ] **Memory Management**: Use streams/pagination for large data109- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks110111### 3. Architecture & Scalability112- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection113- [ ] **Modularity**: Decouple logic from UI/Frameworks114115### 4. Observability & Reliability116- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`117- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`118- [ ] **Error Handling**: Standardized error codes, no bare except119- [ ] **Observability Artifacts**:120 - **Log Fields**: timestamp, level, message, request_id121 - **Metrics**: request_count, error_count, response_time122 - **Dashboards/Alerts**: High Error Rate > 5%123124125## Agent Directives & Error Recovery126*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*127128- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.129- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.130- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.131- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.132133134## Definition of Done (DoD) Checklist135136- [ ] Tests passed + coverage met137- [ ] Lint/Typecheck passed138- [ ] Logging/Metrics/Trace implemented139- [ ] Security checks passed140- [ ] Documentation/Changelog updated141- [ ] Accessibility/Performance requirements met (if frontend)142143144## Anti-patterns145#146147## Reference Links & Examples148149* Internal documentation and examples150* Official documentation and best practices151* Community resources and discussions152153154## Versioning & Changelog155156* **Version**: 1.0.0157* **Changelog**:158 - 2026-02-22: Initial version with complete template structure159160---161> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.162<!-- tomevault:4.0:skill_md:2026-04-13 -->