Crates.io | pretty_grammar |
lib.rs | pretty_grammar |
version | 0.1.3 |
source | src |
created_at | 2019-03-07 06:23:24.495598 |
updated_at | 2019-03-07 11:30:22.516776 |
description | A library that supports simple grammar correction of dynamic strings. |
homepage | |
repository | https://github.com/kerryeon/pretty-grammar |
max_upload_size | |
id | 119279 |
size | 15,643 |
A library that supports simple grammar correction of dynamic strings.
[dependencies]
pretty_grammar = "0.1"
use pretty_grammar::translate;
use pretty_grammar::format_dyn;
fn main() {
let source = "{name}<은> {obj}<를> 좋아합니다.";
let target = translate!(source with
lang: "kr", // Required
name: "철수",
obj: "영희"
);
println!("{}", target);
// 철수는 영희를 좋아합니다.
}
Target Language | Code | Supported |
---|---|---|
Korean | kr | Yes |
English | en | Not Yet |
Distributed under MIT License since 2019.