Getting Started
Native iOS i18n with the BetterI18n Swift SDK — reactive translations in SwiftUI.
BetterI18n's Swift SDK brings the same translation workflow you know from the JS SDK to native iOS apps. It supports iOS 15+, macOS 12+, and watchOS 8+.
The core primitive is I18nStore — an @ObservableObject that handles fetching, caching, and locale switching reactively. Wrap your root view with I18nProvider and every SwiftUI view in the tree gets access via @EnvironmentObject.
I18nProvider(core: BetterI18n(config: I18nConfig(
project: "my-org/my-app",
defaultLocale: "en"
))) {
ContentView()
}Integrating with AI? Run npx skills add better-i18n/skills first — your agent (Cursor, Claude Code, or Windsurf) will already know the SDK patterns, CDN behavior, and key conventions. Then just ask it to set up the integration for you. Learn more →
Features
Offline-first
Two-phase load: cached translations appear instantly, CDN refresh happens in the background.
Reactive
@Published locale, isLoaded, isRefreshing, and error — your UI updates automatically.
Locale switching
setLocale() persists the preference to storage and re-fetches translations for the new locale.
Widget support
AppGroup storage bridges translations to WidgetKit extensions without a network call.
Guides
Setup
Install via SPM and configure I18nProvider in your app entry point.
API Reference
Complete reference for I18nConfig, I18nStore, BetterI18n, and Translator.
Widget Extension
Bridge translations to a WidgetKit extension via App Groups.
AI Tooling
Now that you've integrated the SDK, your AI agent can check coverage, translate keys, and publish — all without leaving your editor.