Files
calendula/app/src/main/res/xml/locales_config.xml
Jean-Luc Makiola 9177a926df feat(i18n): data-driven language picker + locale config
Make the supported-language list a single source of truth so community
translations show up with no code change: add res/xml/locales_config.xml
(en, de) and reference it via android:localeConfig, which also surfaces the
per-app language entry in Android 13+ system settings.

Rewrite AppLanguage to parse locales_config.xml for the supported BCP-47
tags and expose currentTag/apply/displayName (autonyms), dropping the
hardcoded LanguagePref enum; the Settings picker is now built from that list.
Remove the now-unused settings_language_german/english strings.

Adding a language is now: drop in values-<tag>/strings.xml and add one
<locale> line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 23:31:54 +02:00

14 lines
670 B
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
The languages Calendula ships translations for. This is the single source of
truth: each entry must have a matching res/values-<tag>/strings.xml, and is
surfaced automatically in both the in-app language picker (parsed at runtime
by AppLanguage) and the system per-app language settings (Android 13+, via
android:localeConfig in the manifest). To add a community translation, drop
in the values-<tag> folder and add one <locale> line here.
-->
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="en" />
<locale android:name="de" />
</locale-config>