cloudiful-bevy-localization
Reusable Bevy localization runtime for apps that generate their own static locale registry at build time.
Scope:
- locale/text key types
- TOML table loading and flattening
- key completeness and placeholder validation
- runtime lookup, formatting, and locale switching
- Bevy
PluginandResourcewiring
Non-goals:
- scanning downstream
assets/i18n - generating app-specific key constants
- embedding downstream
OUT_DIRartifacts inside the crate
Usage
Generate a static registry in the downstream app and pass it into the plugin:
use ;
const KEYS: & = &;
const SOURCES: & = &;
static LOCALIZATION: LocalizationDefinition = LocalizationDefinition ;
app.add_plugins;
At runtime, use the resource: