Elgg  Version master
language.php File Reference

Go to the source code of this file.


 $user = elgg_extract('entity', $vars, elgg_get_page_owner_entity())
 Provide a way of setting your language prefs. More...
if(!$user instanceof ElggUser$who_can_change_language = elgg_get_config('who_can_change_language')
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options = elgg()->translator->getInstalledTranslations(elgg_is_admin_logged_in())
if(count($options)< 2) $content

Variable Documentation

if (count($options)< 2) $content
Initial value:
'#type' => 'select',
'name' => 'language',
'value' => $user->language,
'options_values' => $options,
'#label' => elgg_echo('user:language:label'),
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
Provide a way of setting your language prefs.
Definition: language.php:8
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
Definition: language.php:20

Definition at line 33 of file language.php.

$options = elgg()->translator->getInstalledTranslations(elgg_is_admin_logged_in())
$user = elgg_extract('entity', $vars, elgg_get_page_owner_entity())

Provide a way of setting your language prefs.

$vars['entity'] the user to set settings for

Definition at line 8 of file language.php.

if (!$user instanceof ElggUser) $who_can_change_language = elgg_get_config('who_can_change_language')

Definition at line 13 of file language.php.