#korean #hangul #hangeul #grammar #grammer

nightly pretty_grammar

A library that supports simple grammar correction of dynamic strings

2 releases

0.1.3 Mar 7, 2019
0.1.2 Mar 7, 2019
0.1.1 Mar 7, 2019
0.1.0 Mar 7, 2019

#321 in Internationalization (i18n)


Used in mp

MIT license

11KB
119 lines

PrettyGrammar

Version A library that supports simple grammar correction of dynamic strings.

Installation

[dependencies]
pretty_grammar = "0.1"

Usage

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);
    // 철수는 영희를 좋아합니다.
}

Supported Languages

Target Language Code Supported
Korean kr Yes
English en Not Yet

Documentation

Docs.rs

License

Distributed under MIT License since 2019.

Dependencies

~3.5MB
~72K SLoC