[−][src]Function rtr::is_enabled
pub fn is_enabled() -> 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_enabled(), true); //assuming that "hello" correspond to "bonjour" in the fr.txt file assert_eq!(rtr("hello"), "salut".to_string()); rtr::disable(); assert_eq!(rtr("hello"), "hello".to_string());