> ios-localization
Standards for String Catalogs, L10n, and Asset Management. Use when adding multi-language support using iOS String Catalogs or L10n workflows. (triggers: **/*.stringcatalog, **/*.xcassets, **/*.strings, LocalizedStringResource, NSLocalizedString, String(localized:))
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/ios-localization?format=md"iOS Localization & Assets Standards
Priority: P1
Implementation Guidelines
Localization (L10n)
- String Catalogs (.stringcatalog): Use for primary localization in Xcode 15+. It provides a visual editor and compile-time checks for missing translations.
- Native Implementation: Use
String(localized: "key")orLocalizedStringResource. Avoid manualNSLocalizedStringwhere possible. - Pluralization: Use String Catalogs' built-in pluralization support instead of complex code logic.
- Formatting: Use
FormattedAPI for dates, numbers, and currencies to respect the user's locale.
Asset Management
- Asset Catalogs (.xcassets): Keep assets organized. Use folders with "Provides Namespace" enabled for large projects.
- SF Symbols: Use for standard icons to ensure consistency and accessibility.
- Vector Assets: Use PDF or SVG and enable "Preserve Vector Data" for resolution independence.
Best Practices
- Hardcoded Strings: Never use hardcoded strings in UI. Every user-facing string must be localized.
- Base Bundle: Ensure
Baselocalization is complete before adding other languages.
Anti-Patterns
- Manual String Formatting:
**No manual currency symbol concat**: Use NumberFormatter or .formatted(.currency). - Loose Asset Files:
**No loose png/jpg files in repo**: Always use Asset Catalogs. - Untranslated Keys:
**No placeholder strings**: Ensure 100% coverage in String Catalogs.
References
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)