aboutsummaryrefslogtreecommitdiff
path: root/documentation/examples/plugins/languages
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-12 14:28:52 -0500
committercash <cash.costello@gmail.com>2011-11-16 19:53:04 -0500
commit11aacb4f048e659d1b86a6ba229438444a186142 (patch)
treed35da1535860f8883e5c92d3571fa2090890d85a /documentation/examples/plugins/languages
parent08a2fc293a9ecb92caa778d32689b595bee1d68d (diff)
downloadelgg-11aacb4f048e659d1b86a6ba229438444a186142.tar.gz
elgg-11aacb4f048e659d1b86a6ba229438444a186142.tar.bz2
added better plugin skeleton and added documentation to some of the examples
Diffstat (limited to 'documentation/examples/plugins/languages')
-rw-r--r--documentation/examples/plugins/languages/en.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/documentation/examples/plugins/languages/en.php b/documentation/examples/plugins/languages/en.php
new file mode 100644
index 000000000..35f838560
--- /dev/null
+++ b/documentation/examples/plugins/languages/en.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * The core language file is in /languages/en.php and each plugin has its
+ * language files in a languages directory. To change a string, copy the
+ * mapping into this file.
+ *
+ * For example, to change the blog Tools menu item
+ * from "Blog" to "Rantings", copy this pair:
+ * 'blog' => "Blog",
+ * into the $mapping array so that it looks like:
+ * 'blog' => "Rantings",
+ *
+ * Follow this pattern for any other string you want to change. Make sure this
+ * plugin is lower in the plugin list than any plugin that it is modifying.
+ *
+ * If you want to add languages other than English, name the file according to
+ * the language's ISO 639-1 code: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
+ */
+
+$mapping = array(
+ 'string:here' => 'Display string here',
+);
+
+add_translation('en', $mapping);