Mercurial > SimpleWebPresenter
comparison accept-language.inc @ 51:2cfea6e84694
Documentation update.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Thu, 11 Oct 2012 00:06:26 +0200 |
| parents | 5c4d7c758fda |
| children | 2e6ba7259281 |
comparison
equal
deleted
inserted
replaced
| 50:2d0cda52f43f | 51:2cfea6e84694 |
|---|---|
| 1 <?php | 1 <?php |
| 2 /** | |
| 3 * @file | |
| 4 * Functionality for determining language use | |
| 5 */ | |
| 6 | |
| 7 /** | |
| 8 * Extracts the accepted languages from the GET query, sorted by | |
| 9 * preference(q-value). | |
| 10 * | |
| 11 * @return associative array of language codes with q value | |
| 12 */ | |
| 2 function acceptedLanguages() { | 13 function acceptedLanguages() { |
| 3 $langs = array(); | 14 $langs = array(); |
| 4 | 15 |
| 5 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | 16 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
| 6 // break up string into pieces (languages and q factors) | 17 // break up string into pieces (languages and q factors) |
