Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
language.php
Go to the documentation of this file.
1 <?php
10 
11 if (!$user instanceof ElggUser) {
12  return;
13 }
14 
15 $title = elgg_echo('user:set:language');
16 $content = elgg_view_input('select', array(
17  'name' => 'language',
18  'value' => $user->language,
19  'options_values' => get_installed_translations(),
20  'label' => elgg_echo('user:language:label'),
21  ));
22 
23 echo elgg_view_module('info', $title, $content);
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
if(!$user instanceof ElggUser) $title
Definition: language.php:15
elgg_view_input($input_type, array $vars=array())
Renders a form field.
Definition: views.php:1332
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
Definition: pageowner.php:56
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1207
$user
Definition: language.php:9
get_installed_translations()
Return an array of installed translations as an associative array "two letter code" => "native langua...
Definition: languages.php:93
$content
Definition: language.php:16