My i18n Rust library
Features
- Fully at compile-time (shouldn't ever crash or experience an issue at runtime, any crash or issue at runtime should be reported as an issue)
[x] Supports arguments (not named, it uses format!() under the hood, see its documentation for all of its caracteristics)- Supports named arguments (of the form
$argument_name) - Fallback language choice (for now, it is always
en-US)
Example
///This macro generates a function per translation key inside the specified struct.
//defaults to `i18n` if called without argument
pub ;
The structure is the following :
└── *The name of your i18n folder*
└── en-US
└── *You can put as many files as you want (with any/no extension) inside each language folder (or inside any subfolder (as many subfolders as you want)), the name of the file (without the extension) is the id of the translation*
└── *Other languages*