# My i18n Rust library
## Features
- [x] Fully at compile-time (shouldn't ever crash or experience an issue at runtime)
- [x] Supports arguments (not named, it uses [format!()](https://doc.rust-lang.org/stable/std/macro.format.html) under the hood, see its documentation for all of its caracteristics)
## Example
```rust
my_i18n_library::i18n!("path_of_the_translations_directory"); //defaults to `i18n` if blank
fn main() {
// Each translation key generates a macro (every non-ASCII letter, number or underscore are removed)
println!("{}", i18n::hello_world!("en-us")); //the first argument is the language, the following are the arguments (optional)
}
```
The structure is the following :
```
└── *The name of your i18n folder*
└── en-US
└── *You can put as many JSON files as you want inside each language folder*
└── *Other languages*
```
The syntax of the JSON translations files is the following :
```json
{
"your_translation_key": "Your translation for the language (= the name of directory the file is in)"
}
```