localization

localization is a skill for Claude Code, Codex from Abdullah4AI/apple-developer-toolkit. It costs 32 tokens per session (1,356 once invoked), scanned A, original, MIT.

Guidance for translating an app, supporting right-to-left languages such as Arabic, and formatting text according to the user's locale.

In plain words
What is it for?
Use it to create language resource files, support left-to-right and right-to-left layouts, switch languages, and format locale-dependent values.
Why use it?
It keeps translations in Apple's standard localization files instead of hardcoding language choices in the app's code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create language resource files, support left-to-right and right-to-left layouts, switch languages, and format locale-dependent values.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullah4ai/apple-developer-toolkit/localization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Abdullah4AI/apple-developer-toolkit --skill localization
Clone the repo
git clone --depth 1 https://github.com/Abdullah4AI/apple-developer-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for localization

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/localization/github.svg)](https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/localization)
Your own site
<a href="https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/localization"><img src="https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/localization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for localization

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/localization"><img src="https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/localization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,356 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01356
Opus 5.5 $0.00013 $0.00542
Sonnet 5.5 $0.00006 $0.00271
Haiku 4.5 $0.00003 $0.00136

Measured 1mo ago against content hash 63889f6fe327, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

localization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

swiftship/internal/skills/data/features/localization/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Localization

LOCALIZATION (.strings files + RTL/LTR + Language Switching):

FORBIDDEN PATTERNS (CRITICAL — violation = broken app):

  • NEVER hardcode translations with if/else or switch on language code. Example of FORBIDDEN code: if appLanguage == "ar" { Text("الإعدادات") } else { Text("Settings") } switch language { case "ar": return "بحث" default: return "Search" }
  • NEVER build a manual translation dictionary/map in code (e.g., let translations = ["en": "Settings", "ar": "الإعدادات"]).
  • NEVER use ternary operators to pick translated strings: Text(isArabic ? "الإعدادات" : "Settings").
  • These patterns bypass Apple's localization system, break when new languages are added, and ignore the environment locale.
  • The ONLY correct approach: use string literals in views — Text("Settings"), Button("Save"), .navigationTitle("Dashboard") — and let Localizable.strings handle translations.
  • The deployment pipeline generates .strings files automatically. Your code must ONLY contain English string literals.

.strings FILE GENERATION:

  • When localization is requested, generate Resources/{lang}.lproj/Localizable.strings for EACH language.
  • File format: standard Apple .strings — one "key" = "translation"; per line.
  • KEYS MUST BE THE ENGLISH TEXT ITSELF. Example: "Settings" = "Settings"; (en), "Settings" = "الإعدادات"; (ar). NOT snake_case like "settings_title".
  • This means Text("Settings") in code auto-localizes because the key IS the English text.
  • English .strings: identity mapping (key = value). Other languages: key = translated value.
  • ALL user-facing strings MUST have a key: Text(), Button(), Label(), Toggle(), navigationTitle(), Section(), alert titles/messages, ContentUnavailableView labels, placeholder text.

CRITICAL — localization key usage rules:

Rule 1 — String LITERALS in views are auto-localized: Text("settings_title"), .navigationTitle("dashboard_title"), Label("tab_workouts", systemImage: "icon") SwiftUI treats these as LocalizedStringKey and looks them up using the environment locale.

Rule 2 — String VARIABLES are NOT auto-localized: let key = "settings_title"; Text(key) — shows raw key text. This is the #1 localization bug. FIX: Text(LocalizedStringKey(key))

Rule 3 — Computed properties returning keys for display: If a switch/computed property returns a key as String (e.g. "metric_steps"), and you pass it to Text(label), it will NOT be localized. FIX: Return LocalizedStringKey instead of String from the computed property.

Rule 4 — NEVER use String(localized:) in view parameters: Text(String(localized: "key")) resolves against SYSTEM locale, NOT the environment locale. Runtime language switching breaks.

Rule 5 — EVERY key in code must exist in EVERY .strings file. Missing key = raw key shown to user.

  • Sample data strings stay as plain String — they are demo content, not translatable.

CONFIG_CHANGES FOR LOCALIZATIONS:

  • CONFIG_CHANGES MUST include "localizations": ["en", "ar", "es"] (list of all language codes).
  • The client reads this to register knownRegions in the Xcode .pbxproj and create .lproj file references.

LANGUAGE SELECTION & SWITCHING:

  • Root view: @AppStorage("appLanguage") private var appLanguage: String = "en"
  • Root @main app MUST apply .id(appLanguage) on RootView AND set locale/layoutDirection: private var layoutDirection: LayoutDirection { ["ar", "he", "fa", "ur"].contains(appLanguage) ? .rightToLeft : .leftToRight } RootView() .id(appLanguage) // MANDATORY: forces full view rebuild on language change .environment(.locale, Locale(identifier: appLanguage)) .environment(.layoutDirection, layoutDirection)
  • .id(appLanguage) is CRITICAL — without it, changing language causes mirrored/broken layouts because SwiftUI animates the layout direction change instead of rebuilding. With .id(), the entire view tree is destroyed and recreated cleanly.
  • Setting locale ALONE does NOT flip layout to RTL. You MUST set layoutDirection explicitly.
  • RTL languages: Arabic (ar), Hebrew (he), Persian/Farsi (fa), Urdu (ur).
  • App restart NOT needed — .id(appLanguage) forces a full view rebuild when @AppStorage changes.
  • Settings screen: add a language picker (Picker or List with checkmark) that writes to @AppStorage("appLanguage").
  • Display language name: Locale(identifier: code).localizedString(forLanguageCode: code) ?? code

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 87 lines · 32 tokens per session scan A 63889f6fe327

Subscribe to this mod's changes

localization is a skill published in the GitHub repository Abdullah4AI/apple-developer-toolkit (11 stars, last pushed 3d ago), licensed MIT. It adds 32 tokens to every session and 1,356 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

chinese-documentation

A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.

jnMetaCode/superpowers-zh · 62 tokens

azure-ai-translation-text-py

Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications. Triggers: "text translation", "translator", "translate text", "transliterate", "TextTranslationClient".

microsoft/skills · 60 tokens

harden

Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.

fengshao1227/ccg-workflow · 62 tokens

seedance-vocab-ja

This skill should be used when the user asks for Japanese Seedance 2.0 prompt wording, Japanese cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into Japanese.

Emily2040/seedance-2.0 · 50 tokens

asc-subscription-localization

Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.

rorkai/app-store-connect-cli-skills · 60 tokens

docs-governance

Use when writing, restructuring, auditing, or reviewing Cherry Studio repository documentation, READMEs, JSDoc, comments, Agent instructions, or paired English/Chinese docs, including source-linked documentation impact checks.

CherryHQ/cherry-studio · 47 tokens