diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:58:52 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 14:58:52 -0300 |
commit | 2d9b20157957a55bd83875775085ed31c9062577 (patch) | |
tree | f051d6d805a3448ea243379a2457be8d67dcfa5f /views/default/core/settings | |
download | elgg-2d9b20157957a55bd83875775085ed31c9062577.tar.gz elgg-2d9b20157957a55bd83875775085ed31c9062577.tar.bz2 |
Squashed 'mod/translation_editor/' content from commit 9d86955
git-subtree-dir: mod/translation_editor
git-subtree-split: 9d86955e6d8b6807578f5a9da0346ac1a146881c
Diffstat (limited to 'views/default/core/settings')
-rw-r--r-- | views/default/core/settings/account/language.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php new file mode 100644 index 000000000..225bccc97 --- /dev/null +++ b/views/default/core/settings/account/language.php @@ -0,0 +1,42 @@ +<?php
+/**
+ * Provide a way of setting your language prefs
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+if ($user = elgg_get_page_owner_entity()) {
+ translation_editor_unregister_translations();
+
+ $translations = get_installed_translations();
+
+ $value = $CONFIG->language;
+ if (!empty($user->language)) {
+ $value = $user->language;
+ }
+
+ if(count($translations ) > 1){
+ ?>
+ <div class="elgg-module elgg-module-info">
+ <div class="elgg-head">
+ <h3><?php echo elgg_echo('user:set:language'); ?></h3>
+ </div>
+ <div class="elgg-body">
+ <p>
+ <?php echo elgg_echo('user:language:label'); ?>:
+ <?php
+ echo elgg_view("input/dropdown", array(
+ 'name' => 'language',
+ 'value' => $value,
+ 'options_values' => $translations
+ ));
+ ?>
+ </p>
+ </div>
+ </div>
+ <?php
+ } else {
+ echo elgg_view("input/hidden", array("name" => "language", "value" => $value));
+ }
+}
\ No newline at end of file |