Expand description
This crate implements bi-directional transliteration for specific languages. Transliteration means that, e.g. a string in Russian can be converted to the latin alphabet, and also converted back to the Russian cyrillic.
The easiest way to use this crate is to use the transliterate
utility function.
use bitranslit::{transliterate, Language};
const LATIN: &'static str = "Lorem ipsum dolor sit amet";
const BULGARIAN: &'static str = "Лорем ипсум долор сит амет";
let output = transliterate(&BULGARIAN, Language::Bulgarian, false);
assert_eq!(output, LATIN.to_string());
let output = transliterate(&LATIN, Language::Bulgarian, true);
assert_eq!(output, BULGARIAN.to_string());
Modules§
Macros§
- language_
pack - Simplify the construction of a language pack. The macro requires at least one mapping and has additionally three optional mappings. Each mapping is an array of tuples. The different mapping types are:
Enums§
- Language
- Languages that support transliteration.
Functions§
- transliterate
- This utility is the prefered way to transliterate a string for any of the supported languages.