Function accept_language::intersection
[−]
[src]
pub fn intersection(
raw_languages: &str,
supported_languages: Vec<&str>
) -> Vec<String>
Compare an Accept-Language header value with your application's supported languages to find the common languages that could be presented to a user.
Example
use accept_language::intersection; let common_languages = intersection("en-US, en-GB;q=0.5", vec!["en-US", "de", "en-GB"]);