Function determineLanguageByHeader
Determines a language code from the value of a header string.
string determineLanguageByHeader(T)
(
string accept_language,
T allowed_languages
) pure @nogc @safe
if (isForwardRange!T && is(ElementType!T : string) || is(T == typeof(only())));
string determineLanguageByHeader(Tuple...)
(
string accept_language,
Tuple allowed_languages
) pure @nogc @safe
if (Tuple .length != 1 || is(Tuple[0] : string));
string determineLanguageByHeader(T)
(
HTTPServerRequest req,
T allowed_languages
) pure @safe
if (isForwardRange!T && is(ElementType!T : string) || is(T == typeof(only())));
string determineLanguageByHeader(Tuple...)
(
HTTPServerRequest req,
Tuple allowed_languages
) pure @safe
if (Tuple .length != 1 || is(Tuple[0] : string));
Returns
The best match from the Accept-Language header for a language. null
if there is no supported language.