Aksara¶
Cross-platform live localization runtime for iOS & Android. One shared i18next-style JSON source of truth, over-the-air updates, O(1) lookup, and live SwiftUI / Jetpack Compose UI โ with a mirrored Swift/Kotlin API kept in lockstep by mirrored tests.
Get started โ iOS Get started โ Android
Why Aksara¶
- Over-the-air updates โ ship new translations without an app-store release.
- Bring your own transport โ Aksara never fetches; you download bundles however
you like and feed them in with
applyBundle. - Pluggable parsing โ a default i18next parser, or inject your own to accept any JSON model.
- O(1) lookup โ JSON is flattened to a hash map.
- Live UI โ language switches and applied updates update the visible UI in real time (SwiftUI and Jetpack Compose).
- One source of truth โ the same JSON on both platforms.
- Safe swaps โ every bundle is validated before it can replace the live table.
Install¶
// Package.swift
dependencies: [ .package(url: "https://github.com/iQbalADR/aksara.git", from: "0.2.0") ]
Also available via CocoaPods and Carthage โ see iOS install.
dependencies {
implementation("io.github.iqbaladr:aksara-core:0.2.0")
implementation("io.github.iqbaladr:aksara-compose:0.2.0") // optional Compose bindings
}
Published to Maven Central โ see Android install.
Quick look¶
import Aksara
Localizer.shared.configure(.init(
defaultLanguage: "en", fallbackLanguage: "en", bundledResource: "en"
))
Localizer.shared.t("common.welcome", args: ["name": "Oncom"]) // "Welcome, Oncom!"
Localizer.shared.t("common.items", count: 3) // plural-aware
Localizer.shared.setLanguage("id") // live update
Same API, both platforms
Every public method exists with the same name and behavior on Swift and Kotlin, and both libraries ship with 47 matching unit tests.
Learn more¶
- JSON format โ how to author your translation bundles.
- Design & roadmap โ architecture and what's planned next.
- GitHub repository