mdref.json config
[mdref/mdref-http] / http / Env / negotiateLanguage.md
1 # static string http\Env::negotiateLanguage(array $supported[, array &$result])
2
3 Negotiate the client's preferred language.
4
5 > ***NOTE:***
6 > The first element of $supported languages serves as a default if no language matches.
7
8 ## Params:
9
10 * array $supported
11 List of supported content languages.
12 * Optional array &$result
13 Out parameter recording negotiation results.
14
15 ## Returns:
16
17 * NULL, if negotiation fails.
18 * string, the negotiated language.