function uptolike_default_language in Uptolike share buttons 7
Share buttons language.
Return value
string Default site language or 'en' if language is not supported.
4 calls to uptolike_default_language()
- uptolike_admin_settings_form in ./
uptolike.admin.inc - Form builder for admin settings page.
- uptolike_block_view in ./
uptolike.module - Implements hook_block_view().
- uptolike_entity_view in ./
uptolike.module - Implements hook_entity_view().
- _uptolike_filter_process in ./
uptolike.module - Uptolike filter process callback.
File
- ./
uptolike.module, line 620 - Main file for Uptolike module.
Code
function uptolike_default_language() {
// Supported languages.
$languages = array(
'en',
'ru',
'ua',
'de',
'es',
'it',
'lt',
'pl',
);
global $language;
$default_language = in_array($language->language, $languages);
return $default_language ? $language->language : 'en';
}