# proc-lang

## Generate multi-language strings at compile time with a basic CSV

## Example

First column in the headers is the default language

```csv
"en","en","fr"
"hello_world","Hello, World!","Bonjour, Le Monde!"
```

```rust
use proc_lang::generate_from_csv;

generate_from_csv!("./test.csv");

fn main() {
    assert_eq!(Language::En, Language::default());
    assert_eq!(HELLO_WORLD.as_str(), "Hello, World!");

    assert_eq!(format!("{}", HELLO_WORLD), HELLO_WORLD.as_str().to_string());

    set_global_language(Language::Fr);
    assert_eq!(HELLO_WORLD.as_str(), "Bonjour, Le Monde!");
}
```

## Changelog

### 0.2.0

 * Made paths relative in proc macro
 * Fixed bug where macro wouldn't re-run when csv is updated

### 0.1.1

 * Implemented FromStr for Language
 * Implement Display and `.as_str()` for Language
