core-locale: shared per-app language plumbing (AppLanguage)

Android-library module, drawn from the byte-identical AppLanguage in Agendula
and Calendula: read the shipped languages from res/xml/locales_config.xml,
get/set the applied language via AppCompatDelegate, and render each language's
autonym. The locales_config resource id is now a parameter, so the module is
app-agnostic. appcompat only, no Compose.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-28 14:12:16 +02:00
parent 367a8ff8af
commit 4eb9809993
6 changed files with 150 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
agp = "9.2.1"
kotlin = "2.3.21"
coreKtx = "1.19.0"
appcompat = "1.7.1"
composeBom = "2026.05.01"
# Material 3 Expressive APIs live in the 1.5 alpha line; pinned to override the BOM.
material3 = "1.5.0-alpha21"
@@ -13,6 +14,7 @@ truth = "1.4.5"
[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-foundation = { group = "androidx.compose.foundation", name = "foundation" }