[−][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 6-tuple
of these items).
Examples:
loon::set_config(loon::Config::default().with_path_pattern("examples/locales/*.yml")); loon::set_config(loon::PathPattern("examples/locales/*.yml")); loon::set_config((loon::PathPattern("examples/locales/*.yml"), loon::DefaultLocale("en")));