Function elasticlunr::lang::from_code

source ·
pub fn from_code(code: &str) -> Option<Box<dyn Language>>
Expand description

Returns the Language for the given two-character ISO 639-1 language code if the language is supported. Returns None if not supported.

Note:

The ISO 639-1 code for Dutch is “nl”. However “du” is used for the module name and pipeline suffix in order to match lunr-languages.