Overview
An Anime Game Launcher supports 21 languages with full localization powered by the Fluent localization system. The launcher automatically detects your system language and provides seamless translation for all UI elements.Supported Languages
The launcher supports the following languages:Western Languages (9)
Western Languages (9)
- English (US) -
en-us(Fallback language) - German -
de-de(Deutsch) - French -
fr-fr(Français) - Spanish -
es-es(Español) - Portuguese (Brazil) -
pt-br(Português) - Italian -
it-it(Italiano) - Dutch -
nl-nl(Nederlands) - Swedish -
sv-se(Svenska) - Polish -
pl-pl(Polski)
Eastern European Languages (4)
Eastern European Languages (4)
- Russian -
ru-ru(Русский) - Ukrainian -
uk-ua(Українська) - Czech -
cs-cz(Čeština) - Hungarian -
hu-hu(Magyar)
Asian Languages (7)
Asian Languages (7)
- Chinese (Simplified) -
zh-cn(简体中文) - Chinese (Traditional) -
zh-tw(繁體中文) - Japanese -
ja-jp(日本語) - Korean -
ko-kr(한국어) - Indonesian -
id-id(Indonesia) - Vietnamese -
vi-vn(Tiếng Việt) - Thai -
th-th(ไทย)
Other Languages (1)
Other Languages (1)
- Turkish -
tr-tr(Türkçe)
src/i18n.rs
Language Detection
The launcher automatically detects your system language using environment variables.Detection Order
Language is detected by checking environment variables in this order:LC_ALL- Complete locale overrideLC_MESSAGES- Message translation localeLANG- System default locale
Fallback Behavior
If your system language is not supported, the launcher falls back to English (US):Language detection is performed once during launcher initialization and stored in a static variable for performance.
Language Configuration
Setting Language Programmatically
The language can be set programmatically:Getting Current Language
Fluent Localization System
The launcher uses Fluent for localization, providing:- Natural-sounding translations
- Support for complex grammar rules
- Pluralization handling
- Variable interpolation
- Fallback mechanisms
Locale Files
Location:./assets/locales/
Structure:
Static Loader Configuration
locales: Directory containing all locale filescore_locales: Common translations shared across all languagesfallback_language: Used when a translation is missing
Translation Macro
Thetr!() macro provides easy access to translations throughout the codebase.
Basic Usage
Without parameters:Implementation Details
Translation Examples in the Code
Throughout the launcher, translations are used for all UI elements: Window titles:Language-Specific Features
Language Formatting
The launcher provides a utility function to format language identifiers:en-usru-ruzh-cn
Language Identifiers
Languages are represented using theunic_langid crate:
Common Translations
Thecommon.ftl file contains core translations used across the application:
Company and Game Names
Names are split into parts to avoid potential trademark/brand issues in the source code.
Language Display Names
RTL Language Support
While the launcher currently doesn’t include Right-to-Left (RTL) languages like Arabic or Hebrew, the Fluent localization system supports them. Future versions could add:- Arabic (
ar) - Hebrew (
he) - Persian (
fa)
Adding New Translations
To add a new language:Translation Quality
All translations should:- Use natural, idiomatic expressions
- Follow the language’s grammar rules
- Match the tone of the original English text
- Be culturally appropriate
- Include proper punctuation and capitalization
Community contributions for translation improvements are welcome! Submit corrections via the project’s repository.
Environment Variable Override
You can override the launcher’s language by setting environment variables: Force Russian:Performance Considerations
Static Initialization
Language selection happens once at startup:- No runtime language detection overhead
- Thread-safe access
- Zero-cost after initialization
Translation Caching
The Fluent system caches compiled translation bundles, ensuring fast lookups even with complex grammar rules.Debugging Translations
Missing Translation Keys
If a translation key is missing, Fluent falls back to:- The English translation (if available)
- The translation key itself (if no fallback exists)
Testing Different Languages
To test a specific language without changing system settings:Accessibility
Proper localization improves accessibility:- Native language support for non-English speakers
- Clear, unambiguous translations
- Consistent terminology across the application
- Support for screen readers (via translated labels)
All UI elements use the translation system, ensuring comprehensive language coverage throughout the launcher.