English Wiktionary's languages, language families and scripts, for Kotlin Multiplatform, Java, Swift, Python, TypeScript, Go and Rust, and as SQL: every code Wiktionary uses, what it calls each one, and how they relate, built into the library so nothing is asked of the wiki.
val english = Language.of("en")
english.name // "English"
english.family?.name // "Anglic"
english.ancestors.map { it.name } // [Early Modern English]
Language.named("Old English")?.code // "ang"
LanguageFamily.of("ine").protoLanguage?.name // "Proto-Indo-European"
Script.of("Deva").nameFor(Language.of("mr")) // "Balbodh"
Language.of("zh").detectScript("語言") // Traditional Han (Hant)dependencies {
implementation("com.fenakhay.polyglossa:polyglossa:2026.11.7")
}.package(url: "https://github.com/fenakhay/polyglossa", from: "2026.11.7")pip install polyglossanpm install polyglossago get fenakhay.com/polyglossa/gocargo add polyglossaThe Kotlin library runs on the JVM (21 and up), where Java uses it from the same coordinates (in Maven,
polyglossa-jvm), JavaScript and natively on macOS, Linux and Windows; the
Swift package on macOS 12, iOS 15, tvOS 15, watchOS 8 and Linux; the Python package on Python 3.11 and up;
the TypeScript package on Node 22 and up, Deno, Bun and browsers; the Go module on Go 1.23 and up;
and the Rust crate on Rust 1.85 and up.
Each release also has the catalog as plain SQL for SQLite, PostgreSQL and MySQL.
The documentation is at docs.fenakhay.com/polyglossa, with every example in Kotlin, Java, Swift, Python, TypeScript, Go and Rust:
- Quick start and Installing
- Languages, Families and Scripts
- Detecting scripts
- Catalogs and SQL
- The data and releases
- API reference and the other languages
- Building
The code is under the MIT licence. The data is English Wiktionary's, under CC BY-SA 4.0, with the marks of Han from Unihan, under the Unicode License V3; see NOTICE.