Skip to main content

disable

Function disable 

Source
pub fn disable()
Expand description

Disable the translation
rtr will returns the argument

ยงExamples

disable() is mostly useful for error handling

extern crate rtr;
use rtr::rtr;

match rtr::init("fr") {
    Ok(_) => (),
    Err(e) => {
        println!("couldn't load fr translation file");
        rtr::disable();
    }
}

use enable to enable it again