[][src]Function rtr::is_enable

pub fn is_enable() -> bool

Return the state of the translation
If false rtr will return the argument
If true rtr will act normaly
True by default

Examples

extern crate rtr;
use rtr::rtr;
rtr::init("fr").unwrap();

assert_eq!(rtr::is_enable(), true);
//assuming that "hello" correspond to "bonjour" in the fr.txt file
assert_eq!(rtr("hello"), "bonjour".to_string());

rtr::disable();
assert_eq!(rtr("hello"), "hello".to_string());