function _language_selection_page_detect_lang_from_url_argument in Language Selection Page 6
Custom function who detect the language from a URL argument.
Return value
string
1 call to _language_selection_page_detect_lang_from_url_argument()
- language_selection_page_init in ./
language_selection_page.module - Implements hook_init().
File
- includes/
language_selection_page.helpers.inc, line 50 - This file contains all the custom functions needed for the module.
Code
function _language_selection_page_detect_lang_from_url_argument() {
$url_parsed = _language_selection_page_parse_url_custom();
$argument = variable_get('language_selection_page_language_url_argument', '');
if (empty($argument)) {
return NULL;
}
if (empty($url_parsed['query'][$argument])) {
return NULL;
}
return _language_selection_page_validate_language($url_parsed['query'][$argument]);
}