Skip to content

Polyglossa Polyglossa

English Wiktionary's languages, language families and scripts, for Kotlin Multiplatform, Swift, Python and 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.

A first look

import com.fenakhay.polyglossa.Language

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"
Language.of("sh").detectScript("Москва")      // Cyrillic (Cyrl)
import Polyglossa

let english = try Language.of("en")
english.name                                  // "English"
english.family?.name                          // "Anglic"
english.ancestors.map(\.name)                 // ["Early Modern English"]
Language.named("Old English")?.code           // "ang"
try Language.of("sh").detectScript("Москва")  // Cyrillic (Cyrl)
from polyglossa import Language

english = Language["en"]
english.name                                  # 'English'
english.family.name                           # 'Anglic'
[a.name for a in english.ancestors]           # ['Early Modern English']
Language.named("Old English").code            # 'ang'
str(Language["sh"].detect_script("Москва"))   # 'Cyrillic (Cyrl)'
SELECT f.name FROM languages l JOIN families f ON f.code = l.family
WHERE l.code = 'en';                          -- Anglic

Installing

dependencies {
    implementation("com.fenakhay.polyglossa:polyglossa:2026.11.6")
}
.package(url: "https://github.com/fenakhay/polyglossa", from: "2026.11.6")
pip install polyglossa==2026.11.6
gh release download 2026.11.6 --repo fenakhay/polyglossa --pattern polyglossa.sql
sqlite3 polyglossa.sqlite < polyglossa.sql

The version is the day the data was exported from Wiktionary: 2026.11.6. Installing has the platforms each one runs on.

Where to go next

  • Quick start

    Look up a language, walk its family and tell which script a word is in.

  • Languages

    Codes, names, types, etymology-only varieties, ancestors and the varieties Wiktionary names.

  • Detecting scripts

    Which script a text is in, as Wiktionary's findBestScript tells it.

  • The data and releases

    Where the data comes from, how often it changes, and what a version means.