[][src]Function loon::set_config

pub fn set_config<I: Into<Config>>(config: I) -> Result<()>

Sets the Config to use for the global translate call.

config can be a Config object, or DefaultLocale, PathPattern, or LocalizedPath (or up to a 4-tuple of these items).

Examples:

use loon::prelude::*;
loon::set_config(Config::default().with_path_pattern("examples/locales/*.yml"));
loon::set_config(PathPattern("examples/locales/*.yml"));
loon::set_config((PathPattern("examples/locales/*.yml"), DefaultLocale("en")));