Skip to main content

resolve_languages

Function resolve_languages 

Source
pub fn resolve_languages(
    include: Option<&[String]>,
    exclude: Option<&[String]>,
) -> Result<Vec<&'static Language>, String>
Expand description

Resolve the active languages from an include (--lang) and an exclude (--exclude-lang) filter.

The base set is the include list, or every registered language when include is None. Any language named in exclude is then removed. Names match a language’s canonical name or an alias; an unrecognized name (in either list) is an error, as is ending up with no languages at all.