Ship your Fyrox game in every language. t!("key") to translate, tp!("key", n) for plurals, JSON/CSV files for translators, and fallback chains so no string is ever blank.
Three steps from monolingual to fully localized. No boilerplate, no framework lock-in.
Create JSON or CSV files per locale. Flat key-value pairs — your translators can use any spreadsheet app for CSV.
Create an I18nManager, load translation files, set the active locale and fallback chains (e.g. ja → en).
Call t!("key") for simple strings or tp!("key", count) for plurals. Template variables expand automatically.
Change the active locale with a single call. All subsequent t!() calls return the new language instantly.
Everything you need for production game localization, from simple string lookup to CLDR-compliant plural rules.
Ergonomic macros for translation lookup. t!("greeting") for simple strings, tp!("item_count", n) for plural-aware translations with automatic CLDR rule selection.
Load translations from JSON (nested or flat) or CSV files. CSV format is spreadsheet-friendly — hand files directly to translators without special tooling.
Configure chains like ja → en so missing keys fall back gracefully. Ship partially-translated locales without blank strings or crashes.
Full Unicode CLDR plural rule coverage. Handles zero/one/two/few/many/other categories correctly for Arabic, Polish, Russian, Japanese, and every other language.
Embed dynamic values in translations: "Hello, {name}!". Variables are expanded at lookup time with type-safe substitution.
Built on parking_lot for lock-free reads. Access the I18nManager from any thread — rendering, asset loading, or background tasks.
Integrates with Fyrox's resource system. Translation files are loaded through the standard ResourceLoader pipeline with full asset management.
Only fyrox-core, serde_json, csv, fxhash, and parking_lot. No bloated ICU libraries, no C dependencies, pure Rust.
Simple, idiomatic Rust. Two macros cover 99% of localization needs.
// Load translations and set up fallback let manager = I18nManager::new(); manager.load_json("locales/en.json"); manager.load_json("locales/ja.json"); manager.set_locale("ja"); manager.set_fallback_chain(vec!["ja", "en"]); // Simple translation let title = t!("menu.title"); // => "ゲームメニュー" // With template variables let greeting = t!("greeting", name = "Player"); // => "こんにちは、Player!" // Plural-aware translation (CLDR rules) let msg = tp!("items_collected", 3); // => "3個のアイテムを集めました" // Switch locale at runtime manager.set_locale("en"); let msg = tp!("items_collected", 1); // => "1 item collected" (singular form) let msg = tp!("items_collected", 5); // => "5 items collected" (plural form)
Both JSON and CSV. JSON files use key-value pairs (flat or nested). CSV files have a simple two-column format (key, translation) that translators can edit in Excel, Google Sheets, or any spreadsheet app without special tools.
You configure a chain like ja → en. When a key is missing in Japanese, the system automatically returns the English translation instead of a blank string. Chains can be any length and support multiple fallback levels.
t!("key") returns a simple translated string with optional template variable expansion. tp!("key", count) selects the correct plural form based on the count, using CLDR plural rules for the current locale. For example, English has "one" and "other" forms, while Arabic has six distinct plural categories.
Yes. The I18nManager uses parking_lot for synchronization and provides fast, lock-free reads. You can safely call t!() from rendering threads, asset-loading threads, or background tasks without contention.
Pro uses OS-native file watching: inotify on Linux, ReadDirectoryChanges on Windows, and kqueue on macOS. When you save a translation file, changes appear instantly in the editor and in-game — no restart, no manual reload button.
Yes. The Free tier is MIT-licensed with no royalties, no attribution requirements in your game, and no restrictions on commercial use. Use it freely in any project.
There is no limit. Load as many locale files as you need. The fxhash-based lookup ensures O(1) translation speed regardless of how many locales or keys are loaded.
The coverage bar shows the percentage of keys translated for each locale. Keys are color-coded: green for translated, yellow for missing (has fallback), and red for completely missing. This makes it easy to see which locales need more work.
Start with the Free tier (MIT). Upgrade to Pro when you need the editor panel and hot reload.