From 1b2de8d7afb0f2f9e3eba05d011213ca851526af Mon Sep 17 00:00:00 2001 From: psychobunny <psycho.bunny@hotmail.com> Date: Mon, 21 Jul 2014 14:41:19 -0400 Subject: [PATCH] updating docs for adding i8n to plugin/themes --- docs/plugins/create.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/plugins/create.rst b/docs/plugins/create.rst index b4c3e21541..583dd4ea99 100644 --- a/docs/plugins/create.rst +++ b/docs/plugins/create.rst @@ -40,7 +40,8 @@ Each plugin package contains a configuration file called ``plugin.json``. Here i "hooks": [ { "hook": "filter:post.save", "method": "filter" }, { "hook": "action:post.save", "method": "emailme" } - ] + ], + "languages": "path/to/languages" } The ``id`` property is a unique name that identifies the plugin. @@ -59,6 +60,8 @@ The ``hooks`` property is an array containing objects that tell NodeBB which hoo * ``method``, the method called in your plugin * ``priority``, the relative priority of the method when it is eventually called (default: 10) +The ``languages`` property is optional, which allows you to set up your own internationalization for your plugin (or theme). Set up a similar directory structure as core, for example: ``language/en_GB/myplugin.json``. + Writing the plugin library ------------------