Skip to content
Browse files

feature(views): added the ability to translation the usersettings title

fixes #2201
  • Loading branch information...
jdalsem committed Mar 11, 2015
1 parent ef56c5a commit 00e9efceaa81482f73eba38ed42874bd109bd0bb
Showing with 10 additions and 1 deletion.
  1. +4 −0 docs/guides/settings.rst
  2. +6 −1 pages/settings/tools.php
@@ -35,6 +35,10 @@ User settings

Your plugin might need to store per user settings too, and you would like to have your plugin's options to appear in the user's settings page. This is also easy to do and follows the same pattern as setting up the global plugin configuration explained earlier. The only difference is that instead of using a ``settings`` file you will use ``usersettings``. So, the path to the user edit view for your plugin would be ``plugins/your_plugin/usersettings.php``.

.. note::

The title of the usersettings form will default to the plugin name. If you want to change this, add a translation for ``plugin_id:usersettings:title``.

Retrieving settings in your code

@@ -29,7 +29,12 @@
$title = $plugin->getManifest()->getName();
if (elgg_language_key_exists($plugin_id . ':usersettings:title')) {
$title = elgg_echo($plugin_id . ':usersettings:title');
} else {
$title = $plugin->getManifest()->getName();
$content = elgg_view_form('plugins/usersettings/save', array(), array('entity' => $plugin));
$params = array(

0 comments on commit 00e9efc

Please sign in to comment.
You can’t perform that action at this time.