← Fyrox Plugin Suite

Fyrox I18n
Localization & Multi-Language Support

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.

Fyrox 1.0+ Rust 1.87+ Free (MIT) Pro Available 200+ Plural Rules

How It Works

Three steps from monolingual to fully localized. No boilerplate, no framework lock-in.

1

Write Translation Files

Create JSON or CSV files per locale. Flat key-value pairs — your translators can use any spreadsheet app for CSV.

2

Load & Configure

Create an I18nManager, load translation files, set the active locale and fallback chains (e.g. ja → en).

3

Translate In-Game

Call t!("key") for simple strings or tp!("key", count) for plurals. Template variables expand automatically.

4

Switch Locales at Runtime

Change the active locale with a single call. All subsequent t!() calls return the new language instantly.

Features

Everything you need for production game localization, from simple string lookup to CLDR-compliant plural rules.

🗣️

t!() and tp!() Macros

Ergonomic macros for translation lookup. t!("greeting") for simple strings, tp!("item_count", n) for plural-aware translations with automatic CLDR rule selection.

📂

JSON & CSV Files

Load translations from JSON (nested or flat) or CSV files. CSV format is spreadsheet-friendly — hand files directly to translators without special tooling.

🔗

Fallback Chains

Configure chains like ja → en so missing keys fall back gracefully. Ship partially-translated locales without blank strings or crashes.

🔢

200+ CLDR Plural Forms

Full Unicode CLDR plural rule coverage. Handles zero/one/two/few/many/other categories correctly for Arabic, Polish, Russian, Japanese, and every other language.

📝

Template Variable Expansion

Embed dynamic values in translations: "Hello, {name}!". Variables are expanded at lookup time with type-safe substitution.

🔒

Thread-Safe

Built on parking_lot for lock-free reads. Access the I18nManager from any thread — rendering, asset loading, or background tasks.

📦

TranslationResource + ResourceLoader

Integrates with Fyrox's resource system. Translation files are loaded through the standard ResourceLoader pipeline with full asset management.

Minimal Dependencies

Only fyrox-core, serde_json, csv, fxhash, and parking_lot. No bloated ICU libraries, no C dependencies, pure Rust.

Code Example

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)

Free vs Pro

Free MIT

  • I18nManager with locale switching
  • t!() and tp!() macros
  • JSON and CSV translation files
  • Fallback chains (ja → en)
  • 200+ CLDR plural forms
  • Template variable expansion
  • Thread-safe (parking_lot)
  • TranslationResource + ResourceLoader
  • Public GitHub repository
  • Community support

Pro Paid

  • Everything in Free
  • Editor panel (locale selector)
  • Translation coverage progress bar
  • Key browser with color coding
  • Search and filter by key/value
  • Inline editing in editor
  • CSV export for translators
  • OS-native file watcher hot reload
  • inotify / ReadDirectoryChanges / kqueue
  • Priority support

Frequently Asked Questions

What translation file formats are supported?

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.

How do fallback chains work?

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.

What is the difference between t!() and tp!()?

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.

Is Fyrox I18n thread-safe?

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.

How does the Pro hot reload work?

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.

Can I use the Free tier in a commercial game?

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.

How many languages can I support simultaneously?

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.

What does the Pro coverage bar show?

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.

Localize your Fyrox game today

Start with the Free tier (MIT). Upgrade to Pro when you need the editor panel and hot reload.