aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/developers/start.php')
-rw-r--r--mod/developers/start.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/mod/developers/start.php b/mod/developers/start.php
index 23b82d9db..b864bca1e 100644
--- a/mod/developers/start.php
+++ b/mod/developers/start.php
@@ -40,6 +40,12 @@ function developers_process_settings() {
elgg_register_plugin_hook_handler('debug', 'log', array($cache, 'insertDump'));
elgg_extend_view('page/elements/foot', 'developers/log');
}
+
+ if (elgg_get_plugin_setting('show_strings', 'developers') == 1) {
+ // first and last in case a plugin registers a translation in an init method
+ register_elgg_event_handler('init', 'system', 'developers_clear_strings', 1000);
+ register_elgg_event_handler('init', 'system', 'developers_clear_strings', 1);
+ }
}
function developers_setup_menu() {
@@ -51,6 +57,17 @@ function developers_setup_menu() {
}
/**
+* Clear all the strings so the raw descriptor strings are displayed
+*/
+function developers_clear_strings() {
+ global $CONFIG;
+
+ $language = get_language();
+ $CONFIG->translations[$language] = array();
+ $CONFIG->translations['en'] = array();
+}
+
+/**
* Serve the theme preview pages
*
* @param array $page