19 releases (3 stable)

1.2.1 Jan 14, 2024
1.2.0 Mar 15, 2023
1.0.1 Dec 5, 2022
1.0.0 Nov 30, 2022
0.2.1 Jul 25, 2021

#174 in Build Utils

Download history 156/week @ 2024-07-29 62/week @ 2024-09-23

77 downloads per month

MIT license

17KB
355 lines

meddl_translate

Translates German to Meddlfrängisch. If you don't know what that is, this is not for you.

Example:

fn main() {
  println!("{}", meddl_translate::translate("Hallo"));
}

There's also other examples available:

$ cargo run --example hello
$ cargo run --example long-text

Exceptions

It's possible to exclude words that should not be translated, e. g. "den" by adding it to the "ignored" array in the translation file:

"ignored": [
  "den"
]

To see it in action, run:

$ cargo run --example ignored

Translations file

A dictionary can be found in the src directory.


lib.rs:

Translate German to (almost) perfect Meddlfrängisch.

Usage

fn main() {
    println!("{}", meddl_translate::translate("Hallo"));
}

Examples

$ cargo run --example hello
$ cargo run --example long-text

Excluding words from being translated

"ignored": [
    "den"
]

Example containing an ignored word:

$ cargo run --example ignored

Benchmark

$ cargo bench

You need to use Rust nightly for running the benchmark.

Dependencies

~2.8–4.5MB
~79K SLoC